Skip to content

Commit

Permalink
fix: allow trailing linebreak for legacy layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
Theaninova committed Dec 8, 2023
1 parent 532dc70 commit 1ccb17f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/backup/compat/legacy-layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1ccb17f

Please sign in to comment.