Skip to content

Commit

Permalink
fix: take a copy of typeUserAttr when processing
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasnetau committed Mar 12, 2024
1 parent f5a361a commit 2a726e0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/js/form-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ function FormBuilder(opts, element, $) {
const attrValType = userAttrType(typeUserAttr[attribute])
if (attrValType !== 'undefined') {
const orig = mi18n.get(attribute)
const tUA = typeUserAttr[attribute]
const tUA = Object.assign({}, typeUserAttr[attribute]) //Take a copy
let origValue = tUA.value
if (attrValType === 'boolean') {
tUA[attribute] ??= tUA.value
Expand All @@ -722,7 +722,6 @@ function FormBuilder(opts, element, $) {
}

i18n[attribute] = orig
tUA.value = origValue
} else if (attrValType === 'undefined' && hasSubType(values, attribute)) {
advField.push(processTypeUserAttrs(typeUserAttr[attribute], values))
} else {
Expand Down

0 comments on commit 2a726e0

Please sign in to comment.