From 04bd6b249c80f5584ec90e563d5f4276b722a463 Mon Sep 17 00:00:00 2001 From: Alexander Shabunevich Date: Sun, 14 Apr 2024 12:10:19 +0300 Subject: [PATCH] fix: correct binding.value check in vue directive --- src/vue.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vue.ts b/src/vue.ts index d20afc6..0b27453 100644 --- a/src/vue.ts +++ b/src/vue.ts @@ -20,7 +20,7 @@ const setArg = (binding: DirectiveBinding, value: string | boolean): void => { export const vMaska: MaskaDirective = (el, binding) => { const input = el instanceof HTMLInputElement ? el : el.querySelector('input') - const opts = { ...binding.value } ?? {} + const opts = binding.value != null ? { ...binding.value } : {} if (input == null || input?.type === 'file') return