Skip to content

Commit

Permalink
fix: handle 0 value for maxdb
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaggernaut555 committed Jan 12, 2022
1 parent 91303d6 commit 6747a3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ async function initSettings() {
let config: Record<string,any> = await $MM.getSettings();
// "fallback" plugin setting doesn't seem to work
settings = {
maxdb: Number(config["maxdb"]) || 12,
maxdb: isNaN(parseFloat(config["maxdb"])) ? 12 : parseFloat(config["maxdb"]),
}
}

Expand Down

0 comments on commit 6747a3d

Please sign in to comment.