From 157b88c909d3289cb89ace731c1f9a19d40797ac Mon Sep 17 00:00:00 2001 From: Alireza Date: Wed, 11 Oct 2023 12:01:32 -0400 Subject: [PATCH] fix(display messages): broken after timings (#3719) --- extensions/default/src/getDisplaySetMessages.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/default/src/getDisplaySetMessages.ts b/extensions/default/src/getDisplaySetMessages.ts index 4472f8de0eb..842c0bcd124 100644 --- a/extensions/default/src/getDisplaySetMessages.ts +++ b/extensions/default/src/getDisplaySetMessages.ts @@ -13,12 +13,12 @@ export default function getDisplaySetMessages( isReconstructable: boolean ): DisplaySetMessageList { const messages = new DisplaySetMessageList(); - const firstInstance = instances[0]; - if (!instances.length || firstInstance) { + if (!instances.length) { messages.addMessage(DisplaySetMessage.CODES.NO_VALID_INSTANCES); return; } + const firstInstance = instances[0]; const { Modality, ImageType, NumberOfFrames } = firstInstance; // Due to current requirements, LOCALIZER series doesn't have any messages if (ImageType?.includes('LOCALIZER')) {