Skip to content
This repository has been archived by the owner on May 27, 2019. It is now read-only.

Commit

Permalink
Do not crash when searchSettings are undefined (hacky fix for #245)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximbaz committed Apr 2, 2018
1 parent 22e8af0 commit 070971c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions chrome/script.browserify.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 070971c

Please sign in to comment.