fix: added fallback labels

This commit is contained in:
Csongor Czezar
2025-12-26 17:18:14 -08:00
parent 5fb3fc5646
commit 795962f3c3

View File

@@ -47,6 +47,8 @@ const filteredProps = computed(() =>
)
const currentLabel = computed(() => {
return modelValue.value ? widget.options?.on : widget.options?.off
return modelValue.value
? (widget.options?.on ?? (widget.options?.off ? 'true' : undefined))
: (widget.options?.off ?? (widget.options?.on ? 'false' : undefined))
})
</script>