minor bugfix...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2020-10-23 06:12:17 +03:00
parent 32bc16c9da
commit 34395a9145

View File

@ -310,8 +310,7 @@ var CollectionActions = actions.Actions({
// if a promise has not yet resolved/rejected, return it // if a promise has not yet resolved/rejected, return it
// and do not start a new one... // and do not start a new one...
if(running[collection]){ if(running[collection]){
return running[collection] return running[collection] }
}
// handle collection... // handle collection...
p = running[collection] = new Promise(function(resolve, reject){ p = running[collection] = new Promise(function(resolve, reject){
@ -330,8 +329,7 @@ var CollectionActions = actions.Actions({
resolve(collection_data) }) resolve(collection_data) })
.catch(function(err){ .catch(function(err){
delete running[collection] delete running[collection]
reject(err) }) reject(err) }) })
})
return p }], return p }],
@ -2756,10 +2754,11 @@ var UICollectionActions = actions.Actions({
mode: function(){ mode: function(){
return this.collections_length > 0 || 'disabled' }, }, return this.collections_length > 0 || 'disabled' }, },
mixedModeCollectionAction(function(title){ mixedModeCollectionAction(function(title){
var that = this
this.ensureCollection(title) this.ensureCollection(title)
.then(function(collection){ .then(function(collection){
this.data.order.inplaceSortAs(collection.data.order) that.data.order.inplaceSortAs(collection.data.order)
this.sortImages('update') }) })], that.sortImages('update') }) })],
}) })
var UICollection = var UICollection =