From a4c86ff549d5017f099f2166c950e61b1de6ad83 Mon Sep 17 00:00:00 2001 From: heyflynn <553465+heyflynn@users.noreply.github.com> Date: Wed, 5 Jun 2024 12:21:50 -0400 Subject: [PATCH] fix(StackViewport): check if imagePlaneModule exists before destructuring (#1291) Co-authored-by: Casey Flynn --- packages/core/src/RenderingEngine/StackViewport.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/core/src/RenderingEngine/StackViewport.ts b/packages/core/src/RenderingEngine/StackViewport.ts index 74de5c1481..317fef1680 100644 --- a/packages/core/src/RenderingEngine/StackViewport.ts +++ b/packages/core/src/RenderingEngine/StackViewport.ts @@ -1601,6 +1601,9 @@ class StackViewport extends Viewport implements IStackViewport, IImagesLoader { return; } const imagePlaneModule = metaData.get(MetadataModules.IMAGE_PLANE, imageId); + if (!imagePlaneModule) { + return; + } const { imagePositionPatient, frameOfReferenceUID: FrameOfReferenceUID } = imagePlaneModule; let { rowCosines, columnCosines } = imagePlaneModule;