mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-03 00:22:49 +00:00
fix: crash with missing action info in chords
This commit is contained in:
@@ -34,7 +34,13 @@
|
|||||||
const index = new Index({tokenize: "full"})
|
const index = new Index({tokenize: "full"})
|
||||||
chords.forEach((chord, i) => {
|
chords.forEach((chord, i) => {
|
||||||
if ("phrase" in chord) {
|
if ("phrase" in chord) {
|
||||||
index.add(i, chord.phrase.map(it => KEYMAP_CODES[it].id).join(""))
|
index.add(
|
||||||
|
i,
|
||||||
|
chord.phrase
|
||||||
|
.map(it => KEYMAP_CODES[it]?.id)
|
||||||
|
.filter(it => !!it)
|
||||||
|
.join(""),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return index
|
return index
|
||||||
|
|||||||
Reference in New Issue
Block a user