Raymond Hill 2018-07-19 22:13:06 -04:00
parent 07c7c3d944
commit b5016a1f7a
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 6 additions and 1 deletions

View File

@ -106,7 +106,12 @@ var onPSLReady = function() {
var onCommandShortcutsReady = function(commandShortcuts) { var onCommandShortcutsReady = function(commandShortcuts) {
if ( Array.isArray(commandShortcuts) === false ) { return; } if ( Array.isArray(commandShortcuts) === false ) { return; }
µb.commandShortcuts = new Map(commandShortcuts); µb.commandShortcuts = new Map(commandShortcuts);
if ( typeof vAPI.commands.update !== 'function' ) { return; } if (
vAPI.commands === undefined ||
typeof vAPI.commands.update !== 'function'
) {
return;
}
for ( let entry of commandShortcuts ) { for ( let entry of commandShortcuts ) {
vAPI.commands.update({ name: entry[0], shortcut: entry[1] }); vAPI.commands.update({ name: entry[0], shortcut: entry[1] });
} }