From 9022a09b4cfa03584cda7c52392ae8e03eb0ad6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thea=20Sch=C3=B6bl?= Date: Wed, 7 Feb 2024 00:11:10 +0100 Subject: [PATCH] fix: allow 0-return on chord deletion --- src/lib/serial/device.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/serial/device.ts b/src/lib/serial/device.ts index 63fc12af..2480ddd7 100644 --- a/src/lib/serial/device.ts +++ b/src/lib/serial/device.ts @@ -244,7 +244,7 @@ export class CharaDevice { async deleteChord(chord: Pick) { 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}`) } /**