Skip to content

Commit 2ea7770

Browse files
committed
Update cache.js
1 parent f424a39 commit 2ea7770

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/cache.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const makePropWatcher = propName => ({
1010
return
1111
}
1212
if (isEmpty(newValue) || isEmpty(oldValue)) {
13-
this[propName] = cloneDeep(newValue || {})
13+
this[propName] = cloneDeep(newValue)
1414
return
1515
}
1616
for (const key in oldValue) {
@@ -26,7 +26,7 @@ export const makePropWatcher = propName => ({
2626

2727
export const makePropCacheMixin = (propName, proxyPropName) => ({
2828
data() {
29-
return { [proxyPropName]: cloneDeep(this[propName] || {}) }
29+
return { [proxyPropName]: cloneDeep(this[propName]) }
3030
},
3131
watch: {
3232
// Work around unwanted re-renders: https://github.com/vuejs/vue/issues/10115

0 commit comments

Comments
 (0)