mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02: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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user