Skip to content

Commit

Permalink
fix(config): Fix modifying array values, such as for dimensions (#999)
Browse files Browse the repository at this point in the history
  • Loading branch information
shivangp76 authored Oct 21, 2024
1 parent 49dd041 commit 29216f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/editor/ConfigObj.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,8 @@ export default class ConfigObj {
extendOrAdd(this.curConfig, key, val)
} else if (cfgCfg.allowInitialUserOverride === true) {
extendOrAdd(this.defaultConfig, key, val)
} else if (this.defaultConfig[key] && typeof this.defaultConfig[key] === 'object') {
this.curConfig[key] = Array.isArray(this.defaultConfig[key]) ? [] : {}
} else if (this.defaultConfig[key] && typeof this.defaultConfig[key] === 'object' && !Array.isArray(this.defaultConfig[key])) {
this.curConfig[key] = {}
this.curConfig[key] = mergeDeep(this.curConfig[key], val)
} else {
this.curConfig[key] = val
Expand Down

0 comments on commit 29216f4

Please sign in to comment.