diff --git a/src/background/runtime.js b/src/background/runtime.js index a81449c1..64b81c00 100644 --- a/src/background/runtime.js +++ b/src/background/runtime.js @@ -60,7 +60,7 @@ class Runtime { this.storage.local.preferences = message.payload.preferences; await this.storage.persist(); - browser.runtime.sendMessage({info: 'preferencesUpdated', fromTabId: sender.tab && sender.tab.id}); + browser.runtime.sendMessage({info: 'preferencesUpdated', fromTabId: sender && sender.tab && sender.tab.id}); if (this.storage.local.preferences.contextMenu !== message.payload.preferences.contextMenu || this.storage.local.preferences.contextMenuBookmarks !== message.payload.preferences.contextMenuBookmarks ||