From 0070da90b9405aa151a306a38815d3cb8123c53d Mon Sep 17 00:00:00 2001 From: kieftrav Date: Thu, 21 Nov 2024 07:44:52 -0600 Subject: [PATCH] Fix failing spec. --- .../src/VolumetricViewer/VolumetricViewer.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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