Fix duplicate calls to search API
TNL-3198 Also fixed a regression with the search breadcrumbs where it wasn't possible to navigate back to the full list.
This commit is contained in:
@@ -90,16 +90,20 @@
|
||||
*/
|
||||
setPage: function (page) {
|
||||
var oldPage = this.currentPage,
|
||||
self = this;
|
||||
return this.goTo(page - (this.isZeroIndexed ? 1 : 0), {reset: true}).then(
|
||||
self = this,
|
||||
deferred = $.Deferred();
|
||||
this.goTo(page - (this.isZeroIndexed ? 1 : 0), {reset: true}).then(
|
||||
function () {
|
||||
self.isStale = false;
|
||||
self.trigger('page_changed');
|
||||
deferred.resolve();
|
||||
},
|
||||
function () {
|
||||
self.currentPage = oldPage;
|
||||
deferred.fail();
|
||||
}
|
||||
);
|
||||
return deferred.promise();
|
||||
},
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user