mirror of
https://github.com/Kong/insomnia
synced 2024-11-07 22:30:15 +00:00
fix deleting a key combination (#6843)
This commit is contained in:
parent
40de2f4766
commit
7d0b1f8452
@ -112,13 +112,15 @@ export const Shortcuts: FC = () => {
|
||||
withPrompt
|
||||
onClick={() => {
|
||||
let toBeRemovedIndex = -1;
|
||||
keyCombosForThisPlatform.forEach((existingKeyComb, index) => {
|
||||
const keyCombs = getPlatformKeyCombinations(hotKeyRegistry[keyboardShortcut]);
|
||||
keyCombs.forEach((existingKeyComb, index) => {
|
||||
if (areSameKeyCombinations(existingKeyComb, keyComb)) {
|
||||
toBeRemovedIndex = index;
|
||||
}
|
||||
});
|
||||
if (toBeRemovedIndex >= 0) {
|
||||
keyCombosForThisPlatform.splice(toBeRemovedIndex, 1);
|
||||
keyCombs.splice(toBeRemovedIndex, 1);
|
||||
|
||||
patchSettings({ hotKeyRegistry });
|
||||
}
|
||||
}}
|
||||
|
Loading…
Reference in New Issue
Block a user