diff --git a/plugins/view-resources/src/components/NumberEditor.svelte b/plugins/view-resources/src/components/NumberEditor.svelte index cfaeb38905..5274d20745 100644 --- a/plugins/view-resources/src/components/NumberEditor.svelte +++ b/plugins/view-resources/src/components/NumberEditor.svelte @@ -43,8 +43,10 @@ { value, format: 'number' }, eventToHTMLElement(ev), (res) => { - if (res !== undefined) value = res - onChange(value) + if (res !== undefined) { + value = res + onChange(value) + } shown = false }, (res) => { diff --git a/plugins/view-resources/src/components/StringEditor.svelte b/plugins/view-resources/src/components/StringEditor.svelte index 5b81c0aa23..31b28339a4 100644 --- a/plugins/view-resources/src/components/StringEditor.svelte +++ b/plugins/view-resources/src/components/StringEditor.svelte @@ -43,8 +43,10 @@ { value }, eventToHTMLElement(ev), (res) => { - if (res !== undefined) value = res - onChange(value) + if (res !== undefined) { + value = res + onChange(value) + } shown = false }, (res) => {