Skip to content

Commit

Permalink
refactor: remove bloat negation from if-statement
Browse files Browse the repository at this point in the history
  • Loading branch information
MGreek committed Apr 6, 2024
1 parent 140e270 commit b21ae0f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,11 @@ export class Factory {
}

protected getWidth(): number {
if (!(this.options.renderer instanceof Renderer)) {
return this.options.renderer.width;
if (this.options.renderer instanceof Renderer) {
return this.options.renderer.getContext().getWidth();
}

return this.options.renderer.getContext().getWidth();
return this.options.renderer.width;
}

/** Return pixels from current stave spacing. */
Expand Down

0 comments on commit b21ae0f

Please sign in to comment.