Skip to content

Commit

Permalink
review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
rvilarl committed May 9, 2021
1 parent 1eb5366 commit 769d7b1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,13 @@ export class Dot extends Modifier {
draw(): void {
const ctx = this.checkContext();
this.setRendered();
if (!this.note || !this.note.getStave() || this.index === undefined) {
throw new Vex.RERR('NoStaveNoteIndex', 'Drawing a dot requires a stave, a note, and an index.');
if (!this.note || this.index === undefined) {
throw new Vex.RERR('NoNoteIndex', 'Drawing a dot requires a note and an index.');
}

const stave = this.note.getStave();
if (!stave) {
throw new Vex.RERR('NoStave', "Can't draw dot without a stave.");
throw new Vex.RERR('NoStave', 'Drawing a dot requires a stave.');
}

const lineSpace = stave.getOptions().spacing_between_lines_px;
Expand Down

0 comments on commit 769d7b1

Please sign in to comment.