From f944c35e99c6f7ede46c037abc9b7e24c379b84d Mon Sep 17 00:00:00 2001 From: Dominik Pschenitschni Date: Fri, 10 Dec 2021 13:21:25 +0100 Subject: [PATCH] chore: simplify focus directive --- src/directives/focus.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/directives/focus.js b/src/directives/focus.js index 11d016987..10a820dda 100644 --- a/src/directives/focus.js +++ b/src/directives/focus.js @@ -5,7 +5,7 @@ export default { // auto focusing elements on mobile can be annoying since in these cases the // keyboard always pops up and takes half of the available space on the screen. // The threshhold is the same as the breakpoints in css. - if (window.innerWidth > 769 || (typeof modifiers.always !== 'undefined' && modifiers.always)) { + if (window.innerWidth > 769 || modifiers?.always) { el.focus() } },