Skip to content

Commit 65f82ce

Browse files
authored
chore(shared): remove extra NaN logic (vuejs#3837)
1 parent 20b6619 commit 65f82ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/shared/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export const toHandlerKey = cacheStringFunction(
143143

144144
// compare whether a value has changed, accounting for NaN.
145145
export const hasChanged = (value: any, oldValue: any): boolean =>
146-
value !== oldValue && (value === value || oldValue === oldValue)
146+
!Object.is(value, oldValue)
147147

148148
export const invokeArrayFns = (fns: Function[], arg?: any) => {
149149
for (let i = 0; i < fns.length; i++) {

0 commit comments

Comments
 (0)