Skip to content

Commit

Permalink
Fix #7350 isPremiumUser is false if user not logged in (#7351)
Browse files Browse the repository at this point in the history
  • Loading branch information
robnagler authored Nov 6, 2024
1 parent a51a4cc commit 1c9aa3d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions sirepo/package_data/static/js/sirepo.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,8 @@ SIREPO.app.factory('authState', function(appDataService, appState, errorService,
};

self.isPremiumUser = function() {
if (! self.paymentPlan) {
throw new Error("isPremiumUser: user not logged in");
}
// positive test (vs just testing 'basic')
return ['enterprise', 'premium'].indexOf(self.paymentPlan) >= 0;
return ['enterprise', 'premium'].indexOf(self.paymentPlan || '') >= 0;
};

self.paymentPlanName = function() {
Expand Down

0 comments on commit 1c9aa3d

Please sign in to comment.