vnFocus: warning en vez de error al fallar
This commit is contained in:
parent
efac73f4bc
commit
1ef62d3e98
|
@ -14,7 +14,7 @@ export function directive() {
|
|||
if(!input.matches(selector))
|
||||
input = input.querySelector(selector);
|
||||
if(!input)
|
||||
throw new Error(`vnFocus: Can't find a focusable element`);
|
||||
console.warn(`vnFocus: Can't find a focusable element`);
|
||||
|
||||
input.focus();
|
||||
|
||||
|
|
Loading…
Reference in New Issue