diff options
Diffstat (limited to 'ext/mixed/js')
-rw-r--r-- | ext/mixed/js/hotkey-help-controller.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/mixed/js/hotkey-help-controller.js b/ext/mixed/js/hotkey-help-controller.js index 032573c1..8137b50b 100644 --- a/ext/mixed/js/hotkey-help-controller.js +++ b/ext/mixed/js/hotkey-help-controller.js @@ -83,6 +83,11 @@ class HotkeyHelpController { async _setupGlobalCommands(commandMap) { const commands = await new Promise((resolve, reject) => { + if (!(isObject(chrome.commands) && typeof chrome.commands.getAll === 'function')) { + resolve([]); + return; + } + chrome.commands.getAll((result) => { const e = chrome.runtime.lastError; if (e) { |