Skip to content

Commit cee3a5a

Browse files
committed
refactor: narrow type guard
1 parent 93f7fad commit cee3a5a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/components/VueSignaturePad.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,8 @@ function draw() {
209209
}
210210
211211
watchEffect(() => {
212+
if (!props.options.backgroundColor || !props.options.penColor)
213+
return
212214
// Update penColor
213215
canvasOptions.value.penColor = props.options.penColor
214216
canvasOptions.value.signaturePad.penColor = props.options.penColor

0 commit comments

Comments
 (0)