From 8801b9bac551cb8d54ed1c98d6f086af008a44c1 Mon Sep 17 00:00:00 2001 From: Kevin Levron Date: Fri, 30 Apr 2021 18:39:45 +0200 Subject: [PATCH] better fix for bindProp --- src/tools.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools.ts b/src/tools.ts index 5403025..8792ec5 100644 --- a/src/tools.ts +++ b/src/tools.ts @@ -21,7 +21,7 @@ export function bindProp(src: any, srcProp: string, dst: any, dstProp?: string): setFromProp(dst[_dstProp], ref.value) watch(ref, (value) => { setFromProp(dst[_dstProp], value) }, { deep: true }) } else { - if (typeof ref.value === 'boolean' || ref.value) dst[_dstProp] = src[srcProp] + if (ref.value !== undefined) dst[_dstProp] = src[srcProp] watch(ref, (value) => { dst[_dstProp] = value }) } }