Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions skeletons/web-extension/background-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@
* @param {Boolean} force don't use the activeTabs array to check for an existing context menu
*/
function updateContextMenu(force) {
// The Chromium that Electron runs does not have a chrome.contextMenus,
// so make sure this doesn't throw an error in Electron
if (!chrome.contextMenus) {
return;
}

// Only add context menu item when an Ember app has been detected
var isEmberApp = !!activeTabs[activeTabId] || force;
if (!isEmberApp && contextMenuAdded) {
Expand Down