mirror of https://github.com/calzoneman/sync.git
(Hopefully) fix a weird channel unload bug
This commit is contained in:
parent
e5af4051f6
commit
fab78019ea
|
@ -206,8 +206,12 @@ exports.createChannel = function (name) {
|
|||
|
||||
exports.getOrCreateChannel = function (name) {
|
||||
var chan = exports.getChannel(name);
|
||||
if(chan !== undefined)
|
||||
if(chan !== undefined && chan.name !== undefined)
|
||||
return chan;
|
||||
else if(chan !== undefined && chan.name === undefined) {
|
||||
Logger.errlog.log("Empty channel still loaded: ", name);
|
||||
delete exports.channels[name];
|
||||
}
|
||||
return exports.createChannel(name);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue