From cbe895be64b7725103747bfacec7c2f3af9097e2 Mon Sep 17 00:00:00 2001 From: Leonardo Campos Date: Thu, 12 Jan 2017 12:52:09 -0200 Subject: [PATCH] LT-350: fix :: Removing measurements from viewport Steps to reproduce - Add a target measurement on baseline and follow up - Remove the follow up measurement from viewport - Remove the baseline measurement from Measurement table ("Delete" button) --- Packages/ohif-measurements/both/configuration/measurements.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Packages/ohif-measurements/both/configuration/measurements.js b/Packages/ohif-measurements/both/configuration/measurements.js index 8cc228a02..c5a0b9de5 100644 --- a/Packages/ohif-measurements/both/configuration/measurements.js +++ b/Packages/ohif-measurements/both/configuration/measurements.js @@ -274,6 +274,10 @@ class MeasurementApi { const groupItems = groupCollection.find(filter).fetch(); const entries = []; groupItems.forEach(groupItem => { + if (!groupItem.toolId) { + return; + } + const collection = this.tools[groupItem.toolId]; entries.push(collection.findOne(groupItem.toolItemId)); collection.remove(groupItem.toolItemId);