From 1c9aa3ddf080ba0fd6ce7f827963cccfe7a2999a Mon Sep 17 00:00:00 2001 From: Rob Nagler <5495179+robnagler@users.noreply.github.com> Date: Wed, 6 Nov 2024 10:11:13 -0700 Subject: [PATCH] Fix #7350 isPremiumUser is false if user not logged in (#7351) --- sirepo/package_data/static/js/sirepo.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sirepo/package_data/static/js/sirepo.js b/sirepo/package_data/static/js/sirepo.js index 4807260c68..4645c176e1 100644 --- a/sirepo/package_data/static/js/sirepo.js +++ b/sirepo/package_data/static/js/sirepo.js @@ -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() {