]> git.immae.eu Git - github/bastienwirtz/homer.git/blobdiff - src/App.vue
Lint fixes
[github/bastienwirtz/homer.git] / src / App.vue
index a0de3386b6ebaa0e9fa4fe20d3f4e5e2140ee60e..9a67a3376039d78a0c0889127c46a47bd914c119 100644 (file)
@@ -41,7 +41,7 @@
 
         <SearchInput
           class="navbar-item is-inline-block-mobile"
-          :hotkey="config.hotkey.search"
+          :hotkey="searchHotkey()"
           @input="filterServices"
           @search-focus="showMenu = true"
           @search-open="navigateToFirstService"
@@ -168,6 +168,11 @@ export default {
     window.onhashchange = this.buildDashboard;
   },
   methods: {
+    searchHotkey() {
+      if (this.config.hotkey && this.config.hotkey.search) {
+        return this.config.hotkey.search;
+      }
+    },
     buildDashboard: async function () {
       const defaults = jsyaml.load(defaultConfig);
       let config;
@@ -206,6 +211,7 @@ export default {
           window.location.href = response.url;
           return;
         }
+
         if (!response.ok) {
           throw Error(`${response.statusText}: ${response.body}`);
         }