Skip to content

Commit

Permalink
Return max BPM as common BPM if there are no timing points
Browse files Browse the repository at this point in the history
  • Loading branch information
kionell committed Aug 25, 2023
1 parent 9c7f303 commit de92346
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Beatmaps/Beatmap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ export class Beatmap implements IBeatmap {
* The most common BPM of a beatmap.
*/
get bpm(): number {
if (!this.controlPoints.timingPoints.length) {
return this.bpmMax;
}

const timingPoints = this.controlPoints.timingPoints;
const hitObjects = this.hitObjects;

Expand Down

0 comments on commit de92346

Please sign in to comment.