Bug 1272133 - Fix runtime error thrown when no shortcut is found for the target platform. r=kmag
MozReview-Commit-ID: CzR64GL5mxn
This commit is contained in:
@@ -77,10 +77,12 @@ CommandList.prototype = {
|
||||
for (let name of Object.keys(manifest.commands)) {
|
||||
let command = manifest.commands[name];
|
||||
let shortcut = command.suggested_key[os] || command.suggested_key.default;
|
||||
commands.set(name, {
|
||||
description: command.description,
|
||||
shortcut: shortcut.replace(/\s+/g, ""),
|
||||
});
|
||||
if (shortcut) {
|
||||
commands.set(name, {
|
||||
description: command.description,
|
||||
shortcut: shortcut.replace(/\s+/g, ""),
|
||||
});
|
||||
}
|
||||
}
|
||||
return commands;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user