From 34395a9145598233a5d1b64c9ac06c4298123ac3 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 23 Oct 2020 06:12:17 +0300 Subject: [PATCH] minor bugfix... Signed-off-by: Alex A. Naanou --- Viewer/features/collections.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Viewer/features/collections.js b/Viewer/features/collections.js index 89c50879..a7af2b72 100755 --- a/Viewer/features/collections.js +++ b/Viewer/features/collections.js @@ -310,8 +310,7 @@ var CollectionActions = actions.Actions({ // if a promise has not yet resolved/rejected, return it // and do not start a new one... if(running[collection]){ - return running[collection] - } + return running[collection] } // handle collection... p = running[collection] = new Promise(function(resolve, reject){ @@ -330,8 +329,7 @@ var CollectionActions = actions.Actions({ resolve(collection_data) }) .catch(function(err){ delete running[collection] - reject(err) }) - }) + reject(err) }) }) return p }], @@ -2756,10 +2754,11 @@ var UICollectionActions = actions.Actions({ mode: function(){ return this.collections_length > 0 || 'disabled' }, }, mixedModeCollectionAction(function(title){ + var that = this this.ensureCollection(title) .then(function(collection){ - this.data.order.inplaceSortAs(collection.data.order) - this.sortImages('update') }) })], + that.data.order.inplaceSortAs(collection.data.order) + that.sortImages('update') }) })], }) var UICollection =