Skip to content

Commit cbc1fbc

Browse files
committed
fix eslint no-self-compare
1 parent acfe1ad commit cbc1fbc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/core/observer/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,11 @@ export function defineReactive (
162162
},
163163
set: function reactiveSetter (newVal) {
164164
const value = getter ? getter.call(obj) : val
165+
/* eslint-disable no-self-compare */
165166
if (newVal === value || (newVal !== newVal && value !== value)) {
166167
return
167168
}
169+
/* eslint-enable no-self-compare */
168170
if (process.env.NODE_ENV !== 'production' && customSetter) {
169171
customSetter()
170172
}

0 commit comments

Comments
 (0)