Skip to content

Commit

Permalink
chore: no load improvement (#6375)
Browse files Browse the repository at this point in the history
  • Loading branch information
anmolsinghbhatia authored Jan 10, 2025
1 parent 8db51ab commit 42e9281
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion web/core/store/issue/issue.store.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -78,14 +79,15 @@ 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) => {
set(this.issuesMap, [issueId, key], issue[key as keyof TIssue]);
});
});

if (!this.issuesMap[issueId]?.is_epic) {
if (!issueBeforeUpdate.is_epic) {
updatePersistentLayer(issueId);
}
};
Expand Down

0 comments on commit 42e9281

Please sign in to comment.