mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-14 08:08:34 +02:00
Fix a bug that caused memory usage to skyrocket because 0 is a meanie
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user