-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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: handle more edge cases in looseEqual()
#379
Conversation
Hey! @yyx990803 Should this function (and some other functions) in |
@yyx990803 Maybe you can revisit this when you find some time. |
given const a = {x: undefined}
const b = {y: 1} the previous logic of const keysA = Object.keys(a)
const keysB = Object.keys(b)
keysA.length === keysB.length && keysA.every((key) => looseEqual(a[key], b[key])) should check the key set of const a = {x: undefined}
const b = {y: 1}
const keysA = Object.keys(a)
const keysB = Object.keys(b)
keysA.length === keysB.length
&& keysA.every((key) => hasOwnProp(b, key))
&& keysB.every((key) => hasOwnProp(a, key))
&& keysA.every((key) => looseEqual(a[key], b[key])) |
found that you use |
See vuejs/vue#9527 details.