From 54e8a3f8f295fd0031920ca747dd16d684675893 Mon Sep 17 00:00:00 2001 From: "Emanuel F. Oliveira" Date: Mon, 13 Feb 2017 12:37:55 -0200 Subject: [PATCH] Bug Fix: Undefined bestMatch exception being thrown when no match was found. --- .../ohif-hanging-protocols/client/protocolEngine.js | 10 ++++------ .../client/lib/classes/metadata/Metadata.js | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Packages/ohif-hanging-protocols/client/protocolEngine.js b/Packages/ohif-hanging-protocols/client/protocolEngine.js index 4fa26ff8e..6efb35bb8 100644 --- a/Packages/ohif-hanging-protocols/client/protocolEngine.js +++ b/Packages/ohif-hanging-protocols/client/protocolEngine.js @@ -428,9 +428,6 @@ HP.ProtocolEngine = class ProtocolEngine { // Insert the new study metadata this.studies.push(studyMetadata); - // Re-match images - this.matchImages(viewport); - // Update the viewport to refresh layout manager with new study this.updateViewports(); }, error => { @@ -668,9 +665,10 @@ HP.ProtocolEngine = class ProtocolEngine { currentViewportData.imageId = currentMatch.imageId; } - if (!currentViewportData.displaySetInstanceUid) { - throw new OHIFError('ProtocolEngine::updateViewports No matching display set found?'); - } + // @TODO Why should we throw an exception when a best match is not found? This was aborting the whole process. + // if (!currentViewportData.displaySetInstanceUid) { + // throw new OHIFError('ProtocolEngine::updateViewports No matching display set found?'); + // } viewportData.push(currentViewportData); }); diff --git a/Packages/ohif-viewerbase/client/lib/classes/metadata/Metadata.js b/Packages/ohif-viewerbase/client/lib/classes/metadata/Metadata.js index 5b5336145..d4c29bfd1 100644 --- a/Packages/ohif-viewerbase/client/lib/classes/metadata/Metadata.js +++ b/Packages/ohif-viewerbase/client/lib/classes/metadata/Metadata.js @@ -24,7 +24,7 @@ export class Metadata { value: data }); - // Define _custom properties as an immutable property + // Define "_custom" properties as an immutable property // IMPORTANT: This property can only be set during instance construction. Object.defineProperty(this, '_custom', { configurable: false,