Skip to content

Commit

Permalink
fix: JSObject function is not defined error
Browse files Browse the repository at this point in the history
  • Loading branch information
Rishabh-Rathod committed Jul 18, 2024
1 parent d044155 commit 88f6c63
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/client/src/ce/sagas/InferAffectedJSObjects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,20 @@ import type { JSCollection } from "entities/JSCollection";
export function getAffectedJSObjectIdsFromJSAction(
action: ReduxAction<unknown> | BufferedReduxAction<unknown>,
): AffectedJSObjects {
if (action.type === ReduxActionTypes.FETCH_ALL_PAGE_ENTITY_COMPLETION) {
return {
ids: [],
isAllAffected: true,
};
}

if (!JS_ACTIONS.includes(action.type)) {
return {
ids: [],
isAllAffected: false,
};
}
// only JS actions here
action as ReduxAction<unknown>;

// When fetching JSActions fails, we need to diff all JSObjects because the reducer updates it
// to empty collection
if (
Expand Down

0 comments on commit 88f6c63

Please sign in to comment.