sschmidTU 3 years ago
parent
commit
c5255f92c2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/OpenSheetMusicDisplay/Cursor.ts

+ 1 - 1
src/OpenSheetMusicDisplay/Cursor.ts

@@ -250,7 +250,7 @@ export class Cursor implements IPlaybackListener {
     y = musicSystem.PositionAndShape.AbsolutePosition.y + musicSystem.StaffLines[0]?.PositionAndShape.RelativePosition.y ?? 0;
     let endY: number = musicSystem.PositionAndShape.AbsolutePosition.y;
     const bottomStaffline: StaffLine = musicSystem.StaffLines[musicSystem.StaffLines.length - 1];
-    if (bottomStaffline) {
+    if (bottomStaffline) { // can be undefined if drawFromMeasureNumber changed after cursor was shown (extended issue 68)
       endY += bottomStaffline.PositionAndShape.RelativePosition.y + bottomStaffline.StaffHeight;
     }
     height = endY - y;