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;
}
function getMeasurementText(measurementData) {
const { location, description } = measurementData;
let text = '...';
if (location) {
text = location;
if (description) {
text += `(${description})`;
}
}
return text;
function getMeasurementText(measurementData = {}) {
const defaultText = '...';
const { location = '', description = '' } = measurementData;
const result = location + (description ? `(${description})` : '');
return result || defaultText;
}
function getDataForEachMeasurementNumber(