|
|
@ -56,7 +56,7 @@ class Executor { |
|
|
|
// We got a callback
|
|
|
|
// We got a callback
|
|
|
|
task.arguments.pop() // remove original callback
|
|
|
|
task.arguments.pop() // remove original callback
|
|
|
|
task.fn.apply(task.this, [...task.arguments, function () { |
|
|
|
task.fn.apply(task.this, [...task.arguments, function () { |
|
|
|
resolve() // triggers next task after next tick // TODO: check if it's at next tick or not
|
|
|
|
resolve() // triggers next task after next tick
|
|
|
|
lastArg.apply(null, arguments) // call original callback
|
|
|
|
lastArg.apply(null, arguments) // call original callback
|
|
|
|
}]) |
|
|
|
}]) |
|
|
|
} else if (!lastArg && task.arguments.length !== 0) { |
|
|
|
} else if (!lastArg && task.arguments.length !== 0) { |
|
|
|