diff --git a/modules/quotes.js b/modules/quotes.js index 2050ec3..af223ca 100644 --- a/modules/quotes.js +++ b/modules/quotes.js @@ -21,6 +21,9 @@ var quotes = function(dbot) { var last = addStack.pop(); if(last) { quotes[last].pop(); + if(quotes[last] === undefined) { + delete quotes[last]; + } rmAllowed = false; dbot.say(data.channel, 'Last quote removed from ' + last + '.'); } else {