mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2025-12-12 22:06:18 +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"})
|
||||
chords.forEach((chord, i) => {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user