fix: 🐛 Desc of meas.table not being updated on properly (#1094)

Is not possible to add Measurement Description if Relabel was not
previously selected

BREAKING CHANGE: 1013

Closes: #1013
This commit is contained in:
ladeirarodolfo 2019-10-25 23:19:16 -03:00 committed by Danny Brown
parent f5560c11b0
commit 85f836cd91

View File

@ -28,16 +28,12 @@ function getAllTools() {
return tools; return tools;
} }
function getMeasurementText(measurementData) { function getMeasurementText(measurementData = {}) {
const { location, description } = measurementData; const defaultText = '...';
let text = '...'; const { location = '', description = '' } = measurementData;
if (location) { const result = location + (description ? `(${description})` : '');
text = location;
if (description) { return result || defaultText;
text += `(${description})`;
}
}
return text;
} }
function getDataForEachMeasurementNumber( function getDataForEachMeasurementNumber(