We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab277ad commit 79cc7bcCopy full SHA for 79cc7bc
src/core/util/options.js
@@ -40,13 +40,16 @@ if (process.env.NODE_ENV !== 'production') {
40
* Helper that recursively merges two data objects together.
41
*/
42
function mergeData (to: Object, from: ?Object): Object {
43
+ if (!from) return to
44
let key, toVal, fromVal
- for (key in from) {
45
+ const keys = Object.keys(from)
46
+ for (let i = 0; i < keys.length; i++) {
47
+ key = keys[i]
48
toVal = to[key]
49
fromVal = from[key]
50
if (!hasOwn(to, key)) {
51
set(to, key, fromVal)
- } else if (isObject(toVal) && isObject(fromVal)) {
52
+ } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {
53
mergeData(toVal, fromVal)
54
}
55
0 commit comments