Merge pull request #158 from keepassxreboot/add_check

Adds check for variable
This commit is contained in:
Janek Bevendorff 2018-05-14 19:52:22 +02:00 committed by GitHub
commit 9844508482
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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});
}
};