mirror of
https://github.com/tenrok/maska.git
synced 2026-06-20 20:00:34 +03:00
fix: correct binding.value check in vue directive
This commit is contained in:
+1
-1
@@ -20,7 +20,7 @@ const setArg = (binding: DirectiveBinding, value: string | boolean): void => {
|
|||||||
|
|
||||||
export const vMaska: MaskaDirective = (el, binding) => {
|
export const vMaska: MaskaDirective = (el, binding) => {
|
||||||
const input = el instanceof HTMLInputElement ? el : el.querySelector('input')
|
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
|
if (input == null || input?.type === 'file') return
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user