From 408facb70786c266e842c75bd77c06479e0b278a Mon Sep 17 00:00:00 2001 From: CzBiX Date: Sun, 8 Aug 2021 13:04:42 +0800 Subject: [PATCH] Fix bug in vue object merge --- src/utils/vue-object-merge.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/vue-object-merge.ts b/src/utils/vue-object-merge.ts index 4210e80..d875d0b 100644 --- a/src/utils/vue-object-merge.ts +++ b/src/utils/vue-object-merge.ts @@ -6,7 +6,7 @@ import { isPlainObject } from 'lodash'; export const stateMerge = function(state: any, value: any, propName?: string, ignoreNull?: boolean) { if (isPlainObject(state) && (propName == null || propName in state)) { const o = propName == null ? state : state[propName]; - if (o != null) { + if (o != null && isPlainObject(value)) { for (const prop in value) { stateMerge(o, value[prop], prop, ignoreNull); }