Minor: transformState and setting error cleanup (#6841)

## Summary

Fixes the routing of TransformState through the node and the console
error from a setting that ends up being undefined via
useRenderModeSetting.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-6841-Minor-transformState-and-setting-error-cleanup-2b46d73d3650817a8da7fca5bc56ea9a)
by [Unito](https://www.unito.io)

---------

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Alexander Brown
2025-11-23 11:24:37 -08:00
committed by GitHub
parent fb3ce74d2f
commit 0b33470744
4 changed files with 19 additions and 40 deletions

View File

@@ -38,8 +38,9 @@ function onChange(
}
// Backward compatibility with old settings dialog.
// Some extensions still listens event emitted by the old settings dialog.
// @ts-expect-error 'setting' is possibly 'undefined'.ts(18048)
app.ui.settings.dispatchChange(setting.id, newValue, oldValue)
if (setting) {
app.ui.settings.dispatchChange(setting.id, newValue, oldValue)
}
}
export const useSettingStore = defineStore('setting', () => {