fix root issue store to have updated url params at all times (#6147)

This commit is contained in:
rahulramesha 2024-12-04 13:57:33 +05:30 committed by GitHub
parent a153de34d6
commit 31b6d52417
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -169,13 +169,13 @@ export class IssueRootStore implements IIssueRootStore {
autorun(() => {
if (rootStore?.user?.data?.id) this.currentUserId = rootStore?.user?.data?.id;
if (rootStore.router.workspaceSlug) this.workspaceSlug = rootStore.router.workspaceSlug;
if (rootStore.router.projectId) this.projectId = rootStore.router.projectId;
if (rootStore.router.cycleId) this.cycleId = rootStore.router.cycleId;
if (rootStore.router.moduleId) this.moduleId = rootStore.router.moduleId;
if (rootStore.router.viewId) this.viewId = rootStore.router.viewId;
if (rootStore.router.globalViewId) this.globalViewId = rootStore.router.globalViewId;
if (rootStore.router.userId) this.userId = rootStore.router.userId;
if (this.workspaceSlug !== rootStore.router.workspaceSlug) this.workspaceSlug = rootStore.router.workspaceSlug;
if (this.projectId !== rootStore.router.projectId) this.projectId = rootStore.router.projectId;
if (this.cycleId !== rootStore.router.cycleId) this.cycleId = rootStore.router.cycleId;
if (this.moduleId !== rootStore.router.moduleId) this.moduleId = rootStore.router.moduleId;
if (this.viewId !== rootStore.router.viewId) this.viewId = rootStore.router.viewId;
if (this.globalViewId !== rootStore.router.globalViewId) this.globalViewId = rootStore.router.globalViewId;
if (this.userId !== rootStore.router.userId) this.userId = rootStore.router.userId;
if (!isEmpty(rootStore?.state?.stateMap)) this.stateMap = rootStore?.state?.stateMap;
if (!isEmpty(rootStore?.state?.projectStates)) this.stateDetails = rootStore?.state?.projectStates;
if (!isEmpty(rootStore?.state?.workspaceStates)) this.workspaceStateDetails = rootStore?.state?.workspaceStates;