mirror of https://github.com/xwiki-labs/cryptpad
avoid a potential type error
This commit is contained in:
parent
be6857e0fd
commit
a21c3372c0
|
@ -17,7 +17,7 @@ module.exports = function () {
|
|||
|
||||
var next = function (id) {
|
||||
setTimeout(function () {
|
||||
if (map[id] && map[id].length === 0) { return void delete map[id]; }
|
||||
if (!map[id] || map[id].length === 0) { return void delete map[id]; }
|
||||
var task = map[id].shift();
|
||||
task(fix1(next, id));
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue