Skip to content

Commit

Permalink
fix(chord diagram): fix fret marker outside diagram
Browse files Browse the repository at this point in the history
Fix error where a fret marker would be rendered
outside the chord diagram if it followed
immediately after the last fret.
  • Loading branch information
omnibrain committed Oct 10, 2024
1 parent 6c3bb7c commit e332a41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/svguitar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,7 @@ export class SVGuitarChord {
fret: fretMarker,
} : fretMarker) as DoubleFretMarker | SingleFretMarker

if (fretMarkerOptions.fret > this.numFrets()) {
if (fretMarkerOptions.fret >= this.numFrets()) {
// don't draw fret markers outside the chord diagram
return;
}
Expand Down

0 comments on commit e332a41

Please sign in to comment.