Prevent uncaught exceptions when uncaching from library
This commit is contained in:
parent
bc24e8d9dc
commit
c6d49cfef0
|
|
@ -1323,7 +1323,10 @@ Channel.prototype.tryUncache = function(user, data) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(this.server.db.removeFromLibrary(this.name, data.id)) {
|
if(this.server.db.removeFromLibrary(this.name, data.id)) {
|
||||||
this.logger.log("*** " + user.name + " deleted " + this.library[data.id].title + " from library");
|
var msg = data.id;
|
||||||
|
if(data.id in this.library)
|
||||||
|
msg = this.library[data.id];
|
||||||
|
this.logger.log("*** " + user.name + " deleted " + msg + " from library");
|
||||||
delete this.library[data.id];
|
delete this.library[data.id];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue