Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rvilarl committed May 9, 2021
1 parent 20c7ee9 commit 14827d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/notehead.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ export class NoteHead extends Note {
}

// Set notehead to a provided `stave`
setStave(stave?: Stave): this {
setStave(stave: Stave): this {
const line = this.getLine();

this.stave = stave;
Expand Down
5 changes: 3 additions & 2 deletions src/stavenote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,9 @@ export class StaveNote extends StemmableNote {
if (noteHeadStyle) noteHead.setStyle(noteHeadStyle);
});

if (this.stave) {
this.note_heads.forEach((head) => head.setStave(this.stave));
const stave = this.stave;
if (stave) {
this.note_heads.forEach((head) => head.setStave(stave));
}
this.calcNoteDisplacements();
return this;
Expand Down

0 comments on commit 14827d2

Please sign in to comment.