From 070971c03101fdd64a1f5c5e283a3e1164b07587 Mon Sep 17 00:00:00 2001 From: Maxim Baz Date: Tue, 3 Apr 2018 00:09:01 +0200 Subject: [PATCH] Do not crash when searchSettings are undefined (hacky fix for #245) --- chrome/script.browserify.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/chrome/script.browserify.js b/chrome/script.browserify.js index 51fc692..05bbcd9 100644 --- a/chrome/script.browserify.js +++ b/chrome/script.browserify.js @@ -38,14 +38,16 @@ function view() { let selector = "button.login"; let options = { onclick: getLoginData.bind(login), - title: "Fill form" + (searchSettings.autoSubmit ? " and submit" : "") + title: + "Fill form" + + (searchSettings && searchSettings.autoSubmit ? " and submit" : "") }; var store = "default"; var name = login; var i; if ((i = login.indexOf(":"))) { - if (searchSettings.customStores.length > 1) { + if (searchSettings && searchSettings.customStores.length > 1) { store = login.substr(0, i); } name = login.substr(++i);