Skip to content

Commit 5c69430

Browse files
DrJKLampagent
andcommitted
fix: preserve null as distinct widget value in normalizeWidgetValue
Amp-Thread-ID: https://ampcode.com/threads/T-019f2953-7ed6-7088-826f-490ffa39ed0c Co-authored-by: Amp <amp@ampcode.com>
1 parent dbe545f commit 5c69430

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/renderer/extensions/vueNodes/composables/useProcessedWidgets.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,12 @@ interface ComputeProcessedWidgetsOptions {
100100
}
101101

102102
function normalizeWidgetValue(value: unknown): WidgetValue {
103-
if (value === null || value === undefined) {
103+
if (value === undefined) {
104104
return undefined
105105
}
106+
if (value === null) {
107+
return null
108+
}
106109
if (
107110
typeof value === 'string' ||
108111
typeof value === 'number' ||

0 commit comments

Comments
 (0)