fix: allow 0-return on chord deletion

This commit is contained in:
2024-02-07 00:11:10 +01:00
parent 7e3e61afd7
commit 9022a09b4c

View File

@@ -244,7 +244,7 @@ export class CharaDevice {
async deleteChord(chord: Pick<Chord, "actions">) {
const status = await this.send(`CML C4 ${stringifyChordActions(chord.actions)}`)
console.log(status)
if (status.at(-1) !== "2") throw new Error(`Failed with status ${status}`)
if (status.at(-1) !== "2" && status.at(-1) !== "0") throw new Error(`Failed with status ${status}`)
}
/**