浏览代码

adapted undefined check.

Matthias Uiberacker 7 年之前
父节点
当前提交
fb3e0745e3
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/MusicalScore/Graphical/VexFlow/VexFlowMusicSheetCalculator.ts

+ 1 - 1
src/MusicalScore/Graphical/VexFlow/VexFlowMusicSheetCalculator.ts

@@ -144,7 +144,7 @@ export class VexFlowMusicSheetCalculator extends MusicSheetCalculator {
     // Stem direction calculation:
     if (graphicalNotes.length > 0) {
       const firstNote: GraphicalNote = graphicalNotes[0];
-      if (firstNote !== undefined) {
+      if (firstNote.sourceNote.ParentVoiceEntry !== undefined) {
         const hasLink: boolean = graphicalStaffEntry.sourceStaffEntry.Link !== undefined;
         if (hasLink) {
           // in case of StaffEntryLink don't check mainVoice / linkedVoice