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

Commit

Permalink
fix: feedback changes
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenCoady committed May 24, 2019
1 parent 09f05a9 commit 892eb2b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/sync/src/cache/createMutationOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ export const createMutationOptions = (options: MutationHelperOptions): MutationO
const update: MutationUpdaterFn = (cache, { data }) => {
if (isArray(updateQuery)) {
for (const query of updateQuery) {
getUpdateFunction(operationName, idField, query, operationType)(cache, { data });
const updateFunction = getUpdateFunction(operationName, idField, query, operationType);
updateFunction(cache, { data });
}
} else {
getUpdateFunction(operationName, idField, updateQuery, operationType)(cache, { data });
const updateFunction = getUpdateFunction(operationName, idField, updateQuery, operationType);
updateFunction(cache, { data });
}
};

Expand Down

0 comments on commit 892eb2b

Please sign in to comment.