Skip to content

Commit

Permalink
linktfix
Browse files Browse the repository at this point in the history
  • Loading branch information
reinhrst committed Mar 15, 2024
1 parent f8020f3 commit 184c6d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/viewer/KeyShortcuts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function ControlShortcutEditPopup<T extends keyof ShortcutsState>(
title: string} >(null)
const actionsByKey = useSelector(selectActionByKeyString)
const duplicateActions = keys.map(key => keyToString(key)).flatMap(
keyString => actionsByKey[keyString].filter(
keyString => actionsByKey[keyString]!.filter(
a => !(a.action === action && a.shortcutsStateKey === shortcutsStateKey)))

const shortcutsPreset = useSelector(
Expand Down Expand Up @@ -215,7 +215,7 @@ function ControlShortcutEditPopup<T extends keyof ShortcutsState>(
(key, index) => <div className={joinedStringFromDict({
[css.shortcut_row]: true,
[css.editing_key]: key === "edit",
[css.shortcut_is_duplicate]: key !== "edit" && actionsByKey[keyToString(key)].length > 1,
[css.shortcut_is_duplicate]: key !== "edit" && actionsByKey[keyToString(key)]!.length > 1,
})}>
<div className={css.shortcut_key}>
{keyToStringsSpecial(
Expand Down Expand Up @@ -303,7 +303,7 @@ const ControlShortcut: FunctionComponent<ControlShortcutProps> = ({
? CONTROLS[action as ValidControlName] : null
const actionsByKey = useSelector(selectActionByKeyString)
const duplicateActions = keys.map(key => keyToString(key)).flatMap(
keyString => actionsByKey[keyString].filter(
keyString => actionsByKey[keyString]!.filter(
a => !(a.action === action && a.shortcutsStateKey === shortcutsStateKey)))

const disabled = useSelector(
Expand Down

0 comments on commit 184c6d7

Please sign in to comment.