Skip to content

Commit

Permalink
delete documentedShortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
Charan-hs committed Sep 23, 2023
1 parent 71db96d commit d5bf680
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libs/KeyboardShortcut/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ _.each(CONST.KEYBOARD_SHORTCUTS, (shortcut) => {
*/
function unsubscribe(displayName, callbackID) {
eventHandlers[displayName] = _.reject(eventHandlers[displayName], (callback) => callback.id === callbackID);
if(_.has(documentedShortcuts, displayName) && _.size(eventHandlers[displayName]) === 0){
delete documentedShortcuts[displayName]
}
}

/**
Expand Down

0 comments on commit d5bf680

Please sign in to comment.