Skip to content

Commit

Permalink
Fix bug in vue object merge
Browse files Browse the repository at this point in the history
  • Loading branch information
CzBiX committed Aug 8, 2021
1 parent 64ae782 commit 408facb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/vue-object-merge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 408facb

Please sign in to comment.