Skip to content

Commit

Permalink
Fix NPS graph not clearing on empty chart
Browse files Browse the repository at this point in the history
  • Loading branch information
tillvit committed Oct 14, 2024
1 parent fa08f08 commit 151ace8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/src/gui/widget/NPSGraphWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,16 @@ export class NPSGraphWidget extends BaseTimelineWidget {

const height = this.manager.app.renderer.screen.height - 40

if (chart.getNotedata().length == 0) {
return
}

const maxNps = chart.getMaxNPS()
const npsGraphData = chart.getNPSGraph()
const lastBeat = chart.getLastBeat()

this.npsGraph.clear()

if (chart.getNotedata().length == 0) {
return
}

if (this.graphGradient) {
this.npsGraph.beginTextureFill({ texture: this.graphGradient })
} else {
Expand Down

0 comments on commit 151ace8

Please sign in to comment.