Skip to content

Commit 47107c1

Browse files
committed
watcher should only update for objects if it is a deep watch
1 parent 69fdf54 commit 47107c1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/watcher.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,9 @@ p.run = function () {
158158
if (this.active) {
159159
var value = this.get()
160160
if (
161-
(typeof value === 'object' && value !== null) ||
162-
value !== this.value
161+
value !== this.value ||
162+
Array.isArray(value) ||
163+
this.deep
163164
) {
164165
var oldValue = this.value
165166
this.value = value

0 commit comments

Comments
 (0)