mirror of
https://github.com/flynx/types.js.git
synced 2025-10-29 02:20:07 +00:00
cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
dc059f07f9
commit
5d6462b9aa
@ -856,8 +856,6 @@ object.Constructor('IterableSequentialPromise', IterablePromise, {
|
||||
var repack = function(list){
|
||||
var res = []
|
||||
for(var [i, e] of list.entries()){
|
||||
// XXX check for .then(..) instead???
|
||||
//if(e instanceof Promise
|
||||
if(e.then
|
||||
// skip last promise -- nothing to wrap...
|
||||
&& i < list.length-1){
|
||||
@ -877,12 +875,9 @@ object.Constructor('IterableSequentialPromise', IterablePromise, {
|
||||
: list
|
||||
list = list instanceof Array ?
|
||||
repack(list)
|
||||
// XXX check for .then(..) instead???
|
||||
//: list instanceof Promise ?
|
||||
: list.then ?
|
||||
list.then(repack)
|
||||
: list
|
||||
|
||||
return handler ?
|
||||
this.__handle(list, handler, onerror)
|
||||
: list },
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user