avoid a potential type error

This commit is contained in:
ansuz 2020-07-23 09:27:29 -04:00
parent be6857e0fd
commit a21c3372c0
1 changed files with 1 additions and 1 deletions

View File

@ -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));
});