Skip to content

Commit

Permalink
better fix for bindProp
Browse files Browse the repository at this point in the history
  • Loading branch information
klevron committed Apr 30, 2021
1 parent 559e8f2 commit 8801b9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
}
}
Expand Down

0 comments on commit 8801b9b

Please sign in to comment.