mirror of
https://github.com/flynx/types.js.git
synced 2025-10-29 02:20:07 +00:00
bugfix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
80eb1aa31e
commit
2ec383c0ee
11
Promise.js
11
Promise.js
@ -157,13 +157,16 @@ object.Constructor('IterablePromise', Promise, {
|
||||
return this.__handle(list.__packed, handler, onerror) }
|
||||
// handle promise / async-iterator...
|
||||
// XXX ITER do we unwind the iterator here or wait to unwind later???
|
||||
if(list instanceof Promise
|
||||
|| (typeof(list) == 'object'
|
||||
&& Symbol.asyncIterator in list)){
|
||||
if(typeof(list) == 'object'
|
||||
&& Symbol.asyncIterator in list){
|
||||
return list
|
||||
.iter(handler, onerror)
|
||||
.then(function(list){
|
||||
return that.__pack(list) }) }
|
||||
return that.__pack(list) })
|
||||
} else if(list instanceof Promise){
|
||||
return list
|
||||
.then(function(list){
|
||||
return that.__pack(list, handler, onerror) }) }
|
||||
// do the work...
|
||||
// NOTE: packing and handling are mixed here because it's faster
|
||||
// to do them both on a single list traverse...
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "ig-types",
|
||||
"version": "6.24.5",
|
||||
"version": "6.24.8",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "ig-types",
|
||||
"version": "6.24.5",
|
||||
"version": "6.24.8",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"ig-object": "^6.0.0",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user