Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

Commit 892eb2b

Browse files
committed
fix: feedback changes
1 parent 09f05a9 commit 892eb2b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/sync/src/cache/createMutationOptions.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,12 @@ export const createMutationOptions = (options: MutationHelperOptions): MutationO
3737
const update: MutationUpdaterFn = (cache, { data }) => {
3838
if (isArray(updateQuery)) {
3939
for (const query of updateQuery) {
40-
getUpdateFunction(operationName, idField, query, operationType)(cache, { data });
40+
const updateFunction = getUpdateFunction(operationName, idField, query, operationType);
41+
updateFunction(cache, { data });
4142
}
4243
} else {
43-
getUpdateFunction(operationName, idField, updateQuery, operationType)(cache, { data });
44+
const updateFunction = getUpdateFunction(operationName, idField, updateQuery, operationType);
45+
updateFunction(cache, { data });
4446
}
4547
};
4648

0 commit comments

Comments
 (0)