浏览代码

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

wolyshaw 2 年之前
父节点
当前提交
f4856990a0
共有 1 个文件被更改,包括 4 次插入1 次删除
  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)