Fix a bug that caused memory usage to skyrocket because 0 is a meanie

This commit is contained in:
Daniel Odendahl Jr
2018-02-22 21:21:03 +00:00
parent 66692f1b1d
commit fd108da04a
2 changed files with 2 additions and 2 deletions
+1
View File
@@ -22,6 +22,7 @@ module.exports = class RomanNumeralCommand extends Command {
}
run(msg, { number }) {
if (number === 0) return msg.say('_nulla_');
let result = '';
for (const [numeral, value] of Object.entries(numerals)) {
while (number >= value) {