From be2f2bbb0f319ac7975dc8d8a688c4ac1b24889f Mon Sep 17 00:00:00 2001 From: gorhill Date: Mon, 29 Sep 2014 09:01:10 -0400 Subject: [PATCH] just in case --- js/contextmenu.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/contextmenu.js b/js/contextmenu.js index 4ee19079b..ea12f84af 100644 --- a/js/contextmenu.js +++ b/js/contextmenu.js @@ -69,6 +69,11 @@ var onContextMenuClicked = function(details, tab) { /******************************************************************************/ var toggleMenu = function(on) { + // In case the permission for contextMenu was not granted. + if ( chrome.contextMenus === undefined ) { + return; + } + // This needs to be local scope: we can't reuse it for more than one // menu creation call. var menuCreateDetails = {