Skip to content

Commit

Permalink
No need for optional chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller committed Jan 5, 2024
1 parent f51d7ad commit 087fc4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/react/hooks/useFragment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export function useFragment<TData = any, TVars = OperationVariables>(
...diffOptions,
immediate: true,
callback(diff) {
if (!equal(diff.result, resultRef.current?.data)) {
if (!equal(diff.result, resultRef.current.data)) {
resultRef.current = diffToResult(diff);
// If we get another update before we've re-rendered, bail out of
// the update and try again. This ensures that the relative timing
Expand Down

0 comments on commit 087fc4c

Please sign in to comment.