diff options
author | mat <27899617+mat-1@users.noreply.github.com> | 2021-02-13 19:02:49 -0600 |
---|---|---|
committer | mat <27899617+mat-1@users.noreply.github.com> | 2021-02-13 19:02:49 -0600 |
commit | 9b2856303374521b315759500cf594ec7f22d293 (patch) | |
tree | f1439e79f6b79ac2f32cfa08e58124bff553b502 /build/cleaners/skyblock/stats.js | |
parent | 728994f435e781eeffcba739698a1c21bba76a83 (diff) | |
download | skyblock-api-9b2856303374521b315759500cf594ec7f22d293.tar.gz skyblock-api-9b2856303374521b315759500cf594ec7f22d293.tar.bz2 skyblock-api-9b2856303374521b315759500cf594ec7f22d293.zip |
fix some stats cutting off at the wrong place
Diffstat (limited to 'build/cleaners/skyblock/stats.js')
-rw-r--r-- | build/cleaners/skyblock/stats.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/build/cleaners/skyblock/stats.js b/build/cleaners/skyblock/stats.js index 81f5544..aa026db 100644 --- a/build/cleaners/skyblock/stats.js +++ b/build/cleaners/skyblock/stats.js @@ -23,8 +23,8 @@ function categorizeStat(statNameRaw) { } for (const categoryMatch of statCategoryMatchers) { // ['deaths_'] - let trailingEnd = categoryMatch[0] == '_'; - let trailingStart = categoryMatch.substr(-1) == '_'; + let trailingEnd = categoryMatch[0] === '_'; + let trailingStart = categoryMatch.substr(-1) === '_'; if (trailingStart && statNameRaw.startsWith(categoryMatch)) { return { category: statCategory, @@ -34,7 +34,7 @@ function categorizeStat(statNameRaw) { else if (trailingEnd && statNameRaw.endsWith(categoryMatch)) { return { category: statCategory, - name: statNameRaw.substr(0, categoryMatch.length) + name: statNameRaw.substr(0, statNameRaw.length - categoryMatch.length) }; } else if (statNameRaw == categoryMatch) { |