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) {
|
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 [];
|
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) {
|
if (glassArray[0].location !== undefined) {
|
||||||
return glassArray;
|
return glassArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
// const converted = [];
|
const converted = [];
|
||||||
// glassArray.forEach((glass) => {
|
glassArray.forEach((glass) => {
|
||||||
// converted.push({
|
converted.push({
|
||||||
// location: glass.glassLocation,
|
location: glass.glassLocation,
|
||||||
// name: glass.glassName
|
name: glass.glassName
|
||||||
// });
|
});
|
||||||
// });
|
});
|
||||||
// return converted;
|
return converted;
|
||||||
return glassArray.map((glass) => ({
|
|
||||||
location: glass?.glassLocation,
|
|
||||||
name: glass?.glassName
|
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function convertResultsForApi(resultsArray) {
|
function convertResultsForApi(resultsArray) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue