|
@@ -967,7 +967,10 @@ export function getGradualLengthByXml(xml) {
|
|
|
isLastNoteAndNotClosed = true;
|
|
|
}
|
|
|
}
|
|
|
- const isKeyWork = keys.find(k => k.startsWith(textContent) || textContent?.startsWith(k))
|
|
|
+
|
|
|
+ const isKeyWork = keys.find(k => {
|
|
|
+ return textContent && (k.startsWith(textContent) || textContent?.startsWith(k))
|
|
|
+ })
|
|
|
if (
|
|
|
ele.type === "metronome" ||
|
|
|
(ele.type === "words" && (textContent.startsWith("a tempo") || isKeyWork) || isLastNoteAndNotClosed)
|