diff --git a/.changeset/sweet-walls-prove.md b/.changeset/sweet-walls-prove.md new file mode 100644 index 000000000..8553238d1 --- /dev/null +++ b/.changeset/sweet-walls-prove.md @@ -0,0 +1,5 @@ +--- +"@tokens-studio/figma-plugin": patch +--- + +Fixed an issue with Update on change. It's now working again, but disabled for new users as intended. diff --git a/src/app/store/models/settings.tsx b/src/app/store/models/settings.tsx index 64631b0c1..af4dec9d1 100644 --- a/src/app/store/models/settings.tsx +++ b/src/app/store/models/settings.tsx @@ -58,7 +58,7 @@ export const settings = createModel()({ sessionRecording: false, updateMode: UpdateMode.SELECTION, updateRemote: true, - updateOnChange: true, + updateOnChange: false, updateStyles: true, tokenType: 'object', ignoreFirstPartForStyles: false, diff --git a/src/app/store/models/tokenState.tsx b/src/app/store/models/tokenState.tsx index f351baf12..3f3883bb9 100644 --- a/src/app/store/models/tokenState.tsx +++ b/src/app/store/models/tokenState.tsx @@ -517,8 +517,8 @@ export const tokenState = createModel()({ dispatch.tokenState.updateAliases({ oldName: payload.oldName, newName: payload.name }); } - if (payload.shouldUpdate && rootState.settings.updateOnChange) { - dispatch.tokenState.updateDocument({ shouldUpdateNodes: false }); + if (payload.shouldUpdate && rootState.settings.updateMode !== 'document') { + dispatch.tokenState.updateDocument({ shouldUpdateNodes: rootState.settings.updateOnChange }); } }, deleteToken() {