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

deepEqual null handling #22

Merged
merged 5 commits into from
Jan 3, 2018
Merged

deepEqual null handling #22

merged 5 commits into from
Jan 3, 2018

Conversation

kube
Copy link
Owner

@kube kube commented Jan 3, 2018

This PR adds null handling in deepEqual function.

Linked Issue

#21

@kube kube self-assigned this Jan 3, 2018
@kube kube merged commit cbf05e1 into master Jan 3, 2018
@@ -41,6 +41,9 @@ const deepEqual = (a: any, b: any) => {
if (typeof a !== typeof b)
return false

if ((a === null || b === null) && a !== b)
Copy link

Choose a reason for hiding this comment

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

No big deal, but the a !== b is redundant, I believe (since it's already established by the first if).

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yeah did that too late in the night. I fix that before the realease.

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