From 69871fccbed229a36b36051d0b5ec6f10566a0f3 Mon Sep 17 00:00:00 2001 From: M Fahru Date: Tue, 28 May 2024 20:22:44 -0700 Subject: [PATCH] Fix plans page hash does not get updated if no hash is on the URL Example case: visit plans page via other pages, the hash will be empty initially, this commit will make sure hash is updated even though no initial hash exists. GitOrigin-RevId: 411585111e8cf1b3eb803059ad4cf98ae4e69b19 --- .../js/pages/user/subscription/plans-v2/plans-v2-hash.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/web/frontend/js/pages/user/subscription/plans-v2/plans-v2-hash.js b/services/web/frontend/js/pages/user/subscription/plans-v2/plans-v2-hash.js index cfc6add521..83ba26a950 100644 --- a/services/web/frontend/js/pages/user/subscription/plans-v2/plans-v2-hash.js +++ b/services/web/frontend/js/pages/user/subscription/plans-v2/plans-v2-hash.js @@ -24,7 +24,7 @@ export function getViewInfoFromHash() { */ export function setHashFromViewTab(viewTab, period) { const newHash = viewTab === 'group' ? 'group' : `${viewTab}-${period}` - if (window.location.hash.substring(1)) { + if (window.location.hash.substring(1) !== newHash) { window.location.hash = newHash } }