Skip to content

Commit

Permalink
Fix typecheck errorz
Browse files Browse the repository at this point in the history
  • Loading branch information
iansan5653 authored Dec 7, 2023
1 parent 95871ed commit 3d792c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hotkey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ function localizeMod(hotkey: string, platform: string = navigator.platform): str

function sortModifiers(hotkey: string): string {
const key = hotkey.split('+').pop()
const modifiers = []
const modifiers: string[] = []
for (const modifier of ['Control', 'Alt', 'Meta', 'Shift']) {
if (hotkey.includes(modifier)) {
modifiers.push(modifier)
}
}
modifiers.push(key)
if (key) modifiers.push(key)
return modifiers.join('+')
}

0 comments on commit 3d792c5

Please sign in to comment.