Browse Source

Merge branch 'hezou-rit' into 11/24SAAS

wolyshaw 2 years ago
parent
commit
f4856990a0
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/views/accompaniment/modals/form.vue

+ 4 - 1
src/views/accompaniment/modals/form.vue

@@ -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)