2
0
mirror of https://github.com/tenrok/maska.git synced 2026-06-08 17:22:27 +03:00

fix: correct binding.value check in vue directive

This commit is contained in:
Alexander Shabunevich
2024-04-14 12:10:19 +03:00
parent 9257950422
commit 04bd6b249c
+1 -1
View File
@@ -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