chore: no load improvement (#6375)

This commit is contained in:
Anmol Singh Bhatia
2025-01-10 18:01:47 +05:30
committed by GitHub
parent 8db51ab295
commit 42e928138c

View File

@@ -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<TIssue>) => {
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);
}
};