Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix social media icons creation #1

Open
marcs7 opened this issue Apr 5, 2021 · 0 comments · May be fixed by #2
Open

Bug fix social media icons creation #1

marcs7 opened this issue Apr 5, 2021 · 0 comments · May be fixed by #2

Comments

@marcs7
Copy link

marcs7 commented Apr 5, 2021

When writing the social variable if one of the social variable is missing all other variable will not be create.
In specific if one of these:

      linkedin="fluffy_cat_on_linkedin"
      facebook="fluffy_cat_on_fb"
      twitter="fluffy_cat_on_twitter"
      youtube="UCFt6TSF464J8K82xeA?"
      pinterest="fluffy_cats_collections"
      instagram="fluffy_cat_on_instgram"

result null according to the if statement

null!=this.props.facebook && null!=this.props.linkedin && null!=this.props.instagram
&& null!=this.props.twitter && null!=this.props.pinterest && null!=this.props.youtube

this will cause that if only one of the social variable is null will hide all of them even if one is not empty.
Using the or (||) instead the and (&&) in the above if control you will correctly display the not empty social variable, the code will results:

null!=this.props.facebook || null!=this.props.linkedin || null!=this.props.instagram
|| null!=this.props.twitter || null!=this.props.pinterest && null!=this.props.youtube

For any dubt reply this issue and i will aswer asap.
Best regards.

marcs7 added a commit to marcs7/simple-react-footer that referenced this issue Aug 14, 2021
@marcs7 marcs7 linked a pull request Aug 14, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant