Skip to content

Commit 35d2fe6

Browse files
committed
return noteheads after build
1 parent 2bf918a commit 35d2fe6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/stavenote.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ export class StaveNote extends StemmableNote {
487487
}
488488

489489
// Builds a `NoteHead` for each key in the note
490-
buildNoteHeads(): void {
490+
buildNoteHeads(): NoteHead[] {
491491
this._noteHeads = [];
492492
const stemDirection = this.getStemDirection();
493493
const keys = this.getKeys();
@@ -548,6 +548,7 @@ export class StaveNote extends StemmableNote {
548548
this.addChildElement(notehead);
549549
this._noteHeads[this.sortedKeyProps[i].index] = notehead;
550550
}
551+
return this._noteHeads;
551552
}
552553

553554
// Automatically sets the stem direction based on the keys in the note

0 commit comments

Comments
 (0)