mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +00:00
some cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
c8cddf8ae5
commit
979d8667e8
@ -234,7 +234,7 @@ var CollectionActions = actions.Actions({
|
||||
|
||||
// XXX should this queue already running calls or a specific collection????
|
||||
// ...I think yes!!
|
||||
// XXX do we need timeuts here????
|
||||
// XXX do we need timeouts here????
|
||||
ensureCollection: ['- Collections/',
|
||||
core.doc`Ensure a collection exists and is consistent...
|
||||
|
||||
@ -270,12 +270,14 @@ var CollectionActions = actions.Actions({
|
||||
var collection_data = this.collections[collection]
|
||||
var handlers = this.collection_handlers
|
||||
|
||||
// sync collection calls...
|
||||
// XXX do we need timeuts here????
|
||||
// if a promise has not yet resolved/rejected, return it
|
||||
// and do not start a new one...
|
||||
// XXX do we need timeouts here????
|
||||
if(!force && running[collection]){
|
||||
return running[collection]
|
||||
}
|
||||
|
||||
// handle collection...
|
||||
p = running[collection] = new Promise(function(resolve, reject){
|
||||
Promise
|
||||
.all(Object.keys(handlers)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user