mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-05 09:32:53 +00:00
fix: allow 0-return on chord deletion
This commit is contained in:
@@ -244,7 +244,7 @@ export class CharaDevice {
|
|||||||
async deleteChord(chord: Pick<Chord, "actions">) {
|
async deleteChord(chord: Pick<Chord, "actions">) {
|
||||||
const status = await this.send(`CML C4 ${stringifyChordActions(chord.actions)}`)
|
const status = await this.send(`CML C4 ${stringifyChordActions(chord.actions)}`)
|
||||||
console.log(status)
|
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}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user