Skip to content

Commit

Permalink
fix(stats/pets): +- stats
Browse files Browse the repository at this point in the history
  • Loading branch information
DuckySoLucky committed Jan 14, 2025
1 parent 294f272 commit 3392123
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/server/stats/pets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function getPetSkins() {
function replaceVariables(template: string, variables: Record<string, string>) {
return template.replace(/\{(\w+)\}/g, (match, name) => {
// ? NOTE: Needed because NEU doesn't return + in front of stats
if (isNaN(parseFloat(name)) === true) {
if (isNaN(parseFloat(name)) === true && parseInt(variables[name]) > 0) {
return `+${variables[name] ?? match}`;
}

Expand Down

0 comments on commit 3392123

Please sign in to comment.