mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
bcf3cf2741
commit
ad6a0f8090
@ -3053,36 +3053,23 @@ function(title, func){
|
|||||||
.map(function(e){
|
.map(function(e){
|
||||||
return [e, ...args] })
|
return [e, ...args] })
|
||||||
: [[items, ...args]])
|
: [[items, ...args]])
|
||||||
// XXX do we .flat(..) the results???
|
|
||||||
return q
|
return q
|
||||||
.then(function(res){
|
.then(function(res){
|
||||||
return res }) } }
|
|
||||||
// XXX we need to flatten this once and in-place...
|
// XXX we need to flatten this once and in-place...
|
||||||
// ...if we keep this code it will copy res
|
// ...if we keep this code it will copy res
|
||||||
// on each call...
|
// on each call...
|
||||||
// ...if we splice the flattened data back
|
// ...if we splice the flattened data back
|
||||||
// into res it will be done on each call...
|
// into res it will be done on each call...
|
||||||
//return res && res.flat() }) } }
|
//return res && res.flat() }) } }
|
||||||
|
// NOTE: we are compensating for this not being flat
|
||||||
|
// in the queue handler above...
|
||||||
|
return res }) } }
|
||||||
|
|
||||||
// run...
|
// run...
|
||||||
return (inputs instanceof Promise
|
return (inputs instanceof Promise
|
||||||
|| inputs instanceof runner.FinalizableQueue) ?
|
|| inputs instanceof runner.FinalizableQueue) ?
|
||||||
inputs.then(
|
inputs.then(
|
||||||
function(items){
|
function(items){
|
||||||
// XXX BUG: the problem here is that by the time
|
|
||||||
// this is run the items can accumulate from
|
|
||||||
// multiple calls but run is still called
|
|
||||||
// once per original call...
|
|
||||||
// ...the problem occurs when inputs is a
|
|
||||||
// queue thus it will resolve to the whole
|
|
||||||
// set of items and not the item we were
|
|
||||||
// called with, we are compensating for
|
|
||||||
// this ( .splice(..) ) above but it does
|
|
||||||
// not work for some reason -- the array
|
|
||||||
// seems not to be the same for each run...
|
|
||||||
// XXX items is definitely copied, though the
|
|
||||||
// items are the same...
|
|
||||||
// ...check the splits/merges...
|
|
||||||
return run([items, ...args]) },
|
return run([items, ...args]) },
|
||||||
function(){
|
function(){
|
||||||
q && q.abort() })
|
q && q.abort() })
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user