From 1ccb17f0538cd37c367851e6c05b96a2862bd06c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thea=20Sch=C3=B6bl?= Date: Fri, 8 Dec 2023 21:04:18 +0100 Subject: [PATCH] fix: allow trailing linebreak for legacy layouts --- src/lib/backup/compat/legacy-layout.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/backup/compat/legacy-layout.ts b/src/lib/backup/compat/legacy-layout.ts index f78b5e47..bca022ff 100644 --- a/src/lib/backup/compat/legacy-layout.ts +++ b/src/lib/backup/compat/legacy-layout.ts @@ -11,7 +11,7 @@ export function csvLayoutToJson(csv: string, device: CharaLayoutFile["device"] = layout: [[], [], []], } - for (const layer of csv.split("\n")) { + for (const layer of csv.trim().split("\n")) { const [layerId, key, action] = layer.substring(1).split(",").map(Number) layout.layout[Number(layerId) - 1][Number(key)] = Number(action)