Skip to content

Commit

Permalink
fix: wrong conditions on reset all
Browse files Browse the repository at this point in the history
  • Loading branch information
rezaelahidev committed Oct 27, 2024
1 parent a5c879a commit 4cc5b9b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/editor/js/hooks/use-attributes/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,8 @@ export const resetAllStates = (state: Object, action: Object): Object => {
const preparedPathValue = update(
dataset,
ref.path,
-1 !== ref.path.indexOf(attributeId)
new RegExp(attributeId + '.', 'ig').test(ref.path) &&
isObject(ref.defaultValue)
? prepare(
ref.path.replace(attributeId + '.', ''),
ref.defaultValue
Expand Down

0 comments on commit 4cc5b9b

Please sign in to comment.