Browse Source

fix: #12279 问题6修复

TIANYONG 1 week ago
parent
commit
0b1071e3c1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/helpers/formateMusic.ts

+ 1 - 1
src/helpers/formateMusic.ts

@@ -1467,7 +1467,7 @@ export const formateTimes = (osmd: OpenSheetMusicDisplay) => {
 				trackIndex: note.trackIndex, // 当前的音符属于第几条分轨
 				isStaccato: note.voiceEntry.isStaccato(),
 				isRestFlag: note.isRestFlag,
-				noteId: note.NoteToGraphicalNoteObjectId,
+				noteId: note.NoteToGraphicalNoteObjectId === undefined ? `restNote${note.sourceMeasure.MeasureNumberXML}` : note.NoteToGraphicalNoteObjectId,
 				measureListIndex: note.sourceMeasure.measureListIndex,
 				MeasureNumberXML: note.sourceMeasure.MeasureNumberXML, // 当前的小节数,(从1开始)
 				_noteLength: _noteLength,