mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
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
This commit is contained in:
parent
218a4538c1
commit
69871fccbe
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue