From 2412c9f741e14c1a9eae1f88ad78c04b215b3222 Mon Sep 17 00:00:00 2001 From: smuddyx Date: Thu, 9 Dec 2021 20:08:24 +0100 Subject: [PATCH] fix invalid songs with no song mark --- src/app/modules/songs/services/text-rendering.service.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/modules/songs/services/text-rendering.service.ts b/src/app/modules/songs/services/text-rendering.service.ts index 9d930ee..d1fbc14 100644 --- a/src/app/modules/songs/services/text-rendering.service.ts +++ b/src/app/modules/songs/services/text-rendering.service.ts @@ -36,6 +36,7 @@ export class TextRenderingService { return [...array, section]; } const lineOfLineText = this.getLineOfLineText(line, transpose); + if (array.length === 0) return array; if (lineOfLineText) array[array.length - 1].lines.push(lineOfLineText); return array; }, [] as Section[]);