mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 09:28:31 +00:00
fixes event update to store
This commit is contained in:
parent
30d0bd4912
commit
cbaca9b8cb
1 changed files with 3 additions and 2 deletions
|
|
@ -60,8 +60,9 @@ export const useAppDataStore = create(
|
|||
const updatedEvents = get().events;
|
||||
|
||||
updatedEvents.forEach((e, index) => {
|
||||
if (e.id === response[index].id) {
|
||||
updatedEvents[index] = response[index];
|
||||
const toUpdate = response.find((r) => r.id === e.id);
|
||||
if (toUpdate) {
|
||||
updatedEvents[index] = toUpdate;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue