diff --git a/src/directive.ts b/src/directive.ts index 529908b..68b7c63 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 || input.type === 'file') return + if (input == null || input?.type === 'file') return checkValue(input)