Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Charan-hs committed Sep 23, 2023
1 parent d5bf680 commit 2be2065
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libs/KeyboardShortcut/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ _.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]
if (_.has(documentedShortcuts, displayName) && _.size(eventHandlers[displayName]) === 0) {
delete documentedShortcuts[displayName];
}
}

Expand Down

0 comments on commit 2be2065

Please sign in to comment.