fix(composer): Dedupe registered key bindings to avoid double undo in composer

This commit is contained in:
Ben Gotow 2016-09-28 12:03:58 -07:00
parent 1e7dfea7d7
commit 6df14d5553

View file

@ -181,7 +181,9 @@ export default class KeymapManager {
if (!this._commandsCache[keystrokes]) {
this._commandsCache[keystrokes] = [];
}
this._commandsCache[keystrokes].push(command);
if (!this._commandsCache[keystrokes].includes(command)) {
this._commandsCache[keystrokes].push(command);
}
}
}