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

Commit

Permalink
fix: react example app build issue (#387)
Browse files Browse the repository at this point in the history
  • Loading branch information
kingsleyzissou committed Mar 6, 2020
1 parent bd09c7e commit 6d736d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions examples/react/package.json
Expand Up @@ -40,5 +40,9 @@
"eslint-plugin-react": "^7.18.0",
"eslint-plugin-react-hooks": "^1.7.0",
"parcel-bundler": "^1.12.4"
},
"alias": {
"react": "react",
"local_modules": "../../node_modules"
}
}
3 changes: 1 addition & 2 deletions packages/offix-cache/src/createMutationOptions.ts
Expand Up @@ -3,7 +3,6 @@ import { CacheOperation } from "./api/CacheOperation";
import { createOptimisticResponse } from "./createOptimisticResponse";
import { CacheUpdatesQuery } from "./api/CacheUpdates";
import { getOperationFieldName, deconstructQuery } from "./utils/helperFunctions";
import { isArray } from "util";

/**
* Interface to overlay helper internals on top of mutation options.
Expand Down Expand Up @@ -104,7 +103,7 @@ export const createMutationOptions = <T = {
const mutationName = getOperationFieldName(mutation);
if (updateQuery) {
const update: MutationUpdaterFn = (cache, { data }) => {
if (isArray(updateQuery)) {
if (Array.isArray(updateQuery)) {
for (const query of updateQuery) {
const updateFunction = getUpdateFunction({
mutationName,
Expand Down

0 comments on commit 6d736d8

Please sign in to comment.