This commit is contained in:
Martin McKeaveney 2025-05-16 15:40:50 +01:00 committed by GitHub
commit 4429995fff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

@ -56,7 +56,13 @@
) => {
if (screen && key) {
searchComponents(screen, key)
editorValue = $previewStore.selectedComponentContext?.state?.[key] ?? ""
const stateValue = $previewStore.selectedComponentContext?.state?.[key]
if (typeof stateValue === "object") {
editorValue = JSON.stringify(stateValue)
} else {
editorValue = stateValue ?? ""
}
} else {
editorValue = ""
componentsUsingState = []