Bug Fix: Undefined bestMatch exception being thrown when no match was found.

This commit is contained in:
Emanuel F. Oliveira authored and Eloízio Salgado committed 2017-03-02 10:18:10 -03:00
1 parent 3917e34a74
commit 54e8a3f8f2
2 files changed
+5 -7

No files matched your search

@@ -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);
});