forked from GitHub/dbot
delete if undefined on rmlast
This commit is contained in:
parent
033aac8240
commit
c413053a7b
@ -21,6 +21,9 @@ var quotes = function(dbot) {
|
|||||||
var last = addStack.pop();
|
var last = addStack.pop();
|
||||||
if(last) {
|
if(last) {
|
||||||
quotes[last].pop();
|
quotes[last].pop();
|
||||||
|
if(quotes[last] === undefined) {
|
||||||
|
delete quotes[last];
|
||||||
|
}
|
||||||
rmAllowed = false;
|
rmAllowed = false;
|
||||||
dbot.say(data.channel, 'Last quote removed from ' + last + '.');
|
dbot.say(data.channel, 'Last quote removed from ' + last + '.');
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user