Skip to content

Commit

Permalink
fix(data): skip recursive call if values are identical (#8967)
Browse files Browse the repository at this point in the history
  • Loading branch information
KaelWD authored and yyx990803 committed Nov 30, 2018
1 parent 05001e6 commit a7658e0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/util/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ function mergeData (to: Object, from: ?Object): Object {
fromVal = from[key]
if (!hasOwn(to, key)) {
set(to, key, fromVal)
} else if (isPlainObject(toVal) && isPlainObject(fromVal)) {
} else if (
toVal !== fromVal &&
isPlainObject(toVal) &&
isPlainObject(fromVal)
) {
mergeData(toVal, fromVal)
}
}
Expand Down

0 comments on commit a7658e0

Please sign in to comment.