Skip to content

Commit

Permalink
fix(scene): fix possible undefined query state
Browse files Browse the repository at this point in the history
  • Loading branch information
haweston authored and hwandersman committed Jun 27, 2024
1 parent cfbca24 commit 0511c34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/scene-composer/src/components/SceneLayers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const SceneLayers: React.FC = () => {
return await fetchSceneNodes(sceneRootEntityId);
},
refetchInterval: (_, query) => {
return !query.state.error && isViewing ? autoUpdateInterval : 0;
return !query?.state?.error && isViewing ? autoUpdateInterval : 0;
},
refetchOnWindowFocus: false,
});
Expand Down

0 comments on commit 0511c34

Please sign in to comment.