Skip to content

Commit

Permalink
fixed anonymous fetching of favorites (don't fetch them) (#2115)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrchudy authored Aug 21, 2021
1 parent 6816fa4 commit 552da9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common/faceting.js
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@
var table = scope.reference.table;
// if the stable key is greater than length 1, the favorites won't be supported for now
// TODO: support this for composite stable keys
if (table.favoritesPath && scope.facetColumn.isEntityMode && table.stableKey.length == 1) {
if (scope.$root.session && table.favoritesPath && scope.facetColumn.isEntityMode && table.stableKey.length == 1) {
// array of column names that represent the stable key of leaf with favorites
// favorites_* will use stable key to store this information
// NOTE: hardcode `scope.reference.table.name` for use in pure and binary table mapping
Expand Down
4 changes: 3 additions & 1 deletion common/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -2332,7 +2332,7 @@
var table = scope.vm.reference.table;
// if the stable key is greater than length 1, the favorites won't be supported for now
// TODO: support this for composite stable keys
if (table.favoritesPath && table.stableKey.length == 1) {
if (scope.$root.session && table.favoritesPath && table.stableKey.length == 1) {
// array of column names that represent the stable key of leaf with favorites
// favorites_* will use stable key to store this information
// NOTE: hardcode `scope.reference.table.name` for use in pure and binary table mapping
Expand Down Expand Up @@ -2367,6 +2367,8 @@
}).catch(function (error) {
defer.resolve({page: page});
});
} else {
defer.resolve({page: page});
}

return defer.promise;
Expand Down

0 comments on commit 552da9b

Please sign in to comment.