Reverting
This commit is contained in:
parent
c57078df6b
commit
558444bcd0
1 changed files with 9 additions and 13 deletions
|
|
@ -1990,25 +1990,21 @@ function sortArrayOfObjectsByPropertyValue(arrayOfObjects, propertyName) {
|
|||
}
|
||||
|
||||
function convertGlassPieceNamingForApi(glassArray) {
|
||||
// check if array already converted. (likely when a session has been saved previously and then reloaded)
|
||||
if (!glassArray || glassArray.length === 0) return [];
|
||||
|
||||
// check if array already converted. (likely when a session has been saved previously and then reloaded)
|
||||
if (glassArray[0].location !== undefined) {
|
||||
return glassArray;
|
||||
}
|
||||
|
||||
// const converted = [];
|
||||
// glassArray.forEach((glass) => {
|
||||
// converted.push({
|
||||
// location: glass.glassLocation,
|
||||
// name: glass.glassName
|
||||
// });
|
||||
// });
|
||||
// return converted;
|
||||
return glassArray.map((glass) => ({
|
||||
location: glass?.glassLocation,
|
||||
name: glass?.glassName
|
||||
}));
|
||||
const converted = [];
|
||||
glassArray.forEach((glass) => {
|
||||
converted.push({
|
||||
location: glass.glassLocation,
|
||||
name: glass.glassName
|
||||
});
|
||||
});
|
||||
return converted;
|
||||
}
|
||||
|
||||
function convertResultsForApi(resultsArray) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue