From c8998d6bf55628a56d805df2d5416a57c0f7d402 Mon Sep 17 00:00:00 2001 From: Ilya Machnev <89526742+hiddenLadder@users.noreply.github.com> Date: Tue, 1 Aug 2023 10:45:01 +0800 Subject: [PATCH] Return if input type equals file Direcitve doesnt work on inputs with type set to 'file', it throws error when value changes --- src/directive.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/directive.ts b/src/directive.ts index 2308944..529908b 100644 --- a/src/directive.ts +++ b/src/directive.ts @@ -17,7 +17,7 @@ export const vMaska: MaskaDirective = (el, binding) => { const input = el instanceof HTMLInputElement ? el : el.querySelector('input') const opts = { ...(binding.arg as MaskInputOptions) } ?? {} - if (input == null) return + if (input == null || input.type === 'file') return checkValue(input)