diff options
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) { |