From 7ae207fdbec921378eef87cee884b832f4eab179 Mon Sep 17 00:00:00 2001 From: Alireza Date: Wed, 11 Oct 2023 11:44:08 -0400 Subject: [PATCH] fix(display messages): broken after timings --- 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')) {