I took the liberty of changing deps.every to deps.some as it makes more sense with the mustWait condition.
The original implementation with deps.every was returning at the first iteration because it was not returning true so the loop was ended prematurely. With deps.some it is not needed because its the truthy value that breaks the loop, not the falsy.
Fixes https://github.com/vazco/universe-ecmascript/issues/3
I took the liberty of changing
deps.every
todeps.some
as it makes more sense with themustWait
condition.The original implementation with
deps.every
was returning at the first iteration because it was not returningtrue
so the loop was ended prematurely. Withdeps.some
it is not needed because its the truthy value that breaks the loop, not the falsy.