diff --git a/packages/lib-subject-viewers/src/VolumetricViewer/VolumetricViewer.js b/packages/lib-subject-viewers/src/VolumetricViewer/VolumetricViewer.js index 1674f9207ee..fd7f3d27e0b 100644 --- a/packages/lib-subject-viewers/src/VolumetricViewer/VolumetricViewer.js +++ b/packages/lib-subject-viewers/src/VolumetricViewer/VolumetricViewer.js @@ -17,11 +17,6 @@ export default function VolumetricViewer ({ }) { const { data, loading, error } = useVolumetricSubject({ onError, onReady, subject }) - // Specs should skip rendering the VolumetricViewer component - // WebGL/Canvas throws exceptions when running specs due to non-browser environment - if (data === 'mock-subject-json') - return
- const [modelState] = useState({ annotations: ModelAnnotations(), tool: ModelTool(), @@ -35,7 +30,11 @@ export default function VolumetricViewer ({ || error || data === null; - return (isLoading) + // Specs should skip rendering the VolumetricViewer component + // WebGL/Canvas throws exceptions when running specs due to non-browser environment + return (data === 'mock-subject-json') + ? + : (isLoading) ?Loading...
: (isError) ?Error