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

Fixed determining primary attribute key for meta tags #692

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alex-bukach
Copy link

Problem / Motivation

primaryAttributeKey is set to the last item in the primaryAttributes array which matches the conditions. If the last property value is null, the whole meta tag will be discarded.

An example: <meta content={'some-content'} property={'some-value'} name={null} />. Here primaryAttributeKey will be set to name (as it is last in the list of properties), and then the meta tag will not be rendered as name is null.

Proposed solution

To avoid such situations we should consider only properties with non-false values as candidates for primaryAttributeKey.

@alexandermirzoyan
Copy link

Can we write tests as well?

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 this pull request may close these issues.

2 participants