Skip to content

Bug fix social media icons creation  #1

@marcs7

Description

@marcs7

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions