mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-05 09:32:53 +00:00
fix: undo/redo prevents use of unknown actions
This commit is contained in:
@@ -100,7 +100,7 @@ export const chords = derived([overlay, deviceChords], ([overlay, chords]) => {
|
||||
return {
|
||||
id: chord.actions,
|
||||
// use the old phrase for stable editing
|
||||
sortBy: chord.phrase.map(it => KEYMAP_CODES[it].id || it).join(),
|
||||
sortBy: chord.phrase.map(it => KEYMAP_CODES[it]?.id ?? it).join(),
|
||||
actions: changedChord.actions,
|
||||
phrase: changedChord.phrase,
|
||||
actionsChanged: id !== JSON.stringify(changedChord.actions),
|
||||
@@ -110,7 +110,7 @@ export const chords = derived([overlay, deviceChords], ([overlay, chords]) => {
|
||||
} else {
|
||||
return {
|
||||
id: chord.actions,
|
||||
sortBy: chord.phrase.map(it => KEYMAP_CODES[it].id || it).join(),
|
||||
sortBy: chord.phrase.map(it => KEYMAP_CODES[it]?.id ?? it).join(),
|
||||
actions: chord.actions,
|
||||
phrase: chord.phrase,
|
||||
phraseChanged: false,
|
||||
|
||||
Reference in New Issue
Block a user