From 42e928138ce6ab15f2df3a7a2ebbe27960ec05c8 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Fri, 10 Jan 2025 18:01:47 +0530 Subject: [PATCH] chore: no load improvement (#6375) --- web/core/store/issue/issue.store.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/core/store/issue/issue.store.ts b/web/core/store/issue/issue.store.ts index e5ba1b1079d..5f40f2443ee 100644 --- a/web/core/store/issue/issue.store.ts +++ b/web/core/store/issue/issue.store.ts @@ -1,3 +1,4 @@ +import clone from "lodash/clone"; import set from "lodash/set"; import update from "lodash/update"; import { action, makeObservable, observable, runInAction } from "mobx"; @@ -78,6 +79,7 @@ export class IssueStore implements IIssueStore { */ updateIssue = (issueId: string, issue: Partial) => { if (!issue || !issueId || !this.issuesMap[issueId]) return; + const issueBeforeUpdate = clone(this.issuesMap[issueId]); runInAction(() => { set(this.issuesMap, [issueId, "updated_at"], getCurrentDateTimeInISO()); Object.keys(issue).forEach((key) => { @@ -85,7 +87,7 @@ export class IssueStore implements IIssueStore { }); }); - if (!this.issuesMap[issueId]?.is_epic) { + if (!issueBeforeUpdate.is_epic) { updatePersistentLayer(issueId); } };