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

Fix: Remove props.key even when key === 0 or key === "" #1607

Merged
merged 1 commit into from May 6, 2019
Merged

Fix: Remove props.key even when key === 0 or key === "" #1607

merged 1 commit into from May 6, 2019

Conversation

jviide
Copy link
Contributor

@jviide jviide commented May 6, 2019

This pull request fixes a case where a component may have props.key set when key === 0 or key === "".

Added tests for props.key removal (as well as props.ref removal as that code got also changed a bit).

As luck would have it this also cuts down preact.js.gz size by 1 byte :)

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 96dbf6a on jviide:fix-props-key into 0eb7a5d on developit:master.

Copy link
Member

@JoviDeCroock JoviDeCroock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find, going strong! 💪

Copy link
Member

@marvinhagemeister marvinhagemeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet! 👍

@marvinhagemeister marvinhagemeister merged commit 719a2e8 into preactjs:master May 6, 2019
@jviide jviide deleted the fix-props-key branch May 6, 2019 12:21
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.

None yet

4 participants