Adds check for variable

This commit is contained in:
varjolintu 2018-05-14 13:54:22 +03:00
parent 47824604f6
commit 4466e5e383

View file

@ -1041,7 +1041,9 @@ keepass.reconnect = function(callback, tab) {
};
keepass.updatePopup = function(iconType) {
const data = page.tabs[page.currentTabId].stack[page.tabs[page.currentTabId].stack.length - 1];
data.iconType = iconType;
browserAction.show(null, {'id': page.currentTabId});
if (page && page.tabs.length > 0) {
const data = page.tabs[page.currentTabId].stack[page.tabs[page.currentTabId].stack.length - 1];
data.iconType = iconType;
browserAction.show(null, {'id': page.currentTabId});
}
};