Skip to content

Commit 941b9ac

Browse files
KaelWDhefeng
authored and
hefeng
committed
fix(data): skip recursive call if values are identical (vuejs#8967)
1 parent 52d87eb commit 941b9ac

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/core/util/options.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ function mergeData (to: Object, from: ?Object): Object {
5555
fromVal = from[key]
5656
if (!hasOwn(to, key)) {
5757
set(to, key, fromVal)
58-
} else if (isPlainObject(toVal) && isPlainObject(fromVal)) {
58+
} else if (
59+
toVal !== fromVal &&
60+
isPlainObject(toVal) &&
61+
isPlainObject(fromVal)
62+
) {
5963
mergeData(toVal, fromVal)
6064
}
6165
}

0 commit comments

Comments
 (0)