bridge-compile
Advanced tools
Comparing version 1.0.21 to 1.0.22
@@ -108,3 +108,3 @@ "use strict"; | ||
}; | ||
let errorsFormated = {}; | ||
const errorsFormated = {}; | ||
jsonHandler.returnBridgeType.error.union.forEach((error) => { | ||
@@ -115,7 +115,7 @@ const statusCode = (error.object.status.value || 500).toString(); | ||
else if ('union' in errorsFormated[statusCode].object.name) | ||
errorsFormated[statusCode].object.name = { | ||
union: [...errorsFormated[statusCode].object.name.union, error.object.name], | ||
}; | ||
else | ||
errorsFormated[statusCode].object.name = { union: [errorsFormated[statusCode].object.name, error.object.name] }; | ||
if (!errorsFormated[statusCode].object.name.union.includes(error.object.name)) { | ||
errorsFormated[statusCode].object.name.union.push(error.object.name); | ||
} | ||
else | ||
errorsFormated[statusCode].object.name = { union: [errorsFormated[statusCode].object.name, error.object.name] }; | ||
}); | ||
@@ -132,3 +132,2 @@ for (const [status, error] of Object.entries(errorsFormated)) { | ||
} | ||
errorsFormated = {}; | ||
if (jsonHandler.body) | ||
@@ -135,0 +134,0 @@ operationObject.requestBody = { |
{ | ||
"name": "bridge-compile", | ||
"version": "1.0.21", | ||
"version": "1.0.22", | ||
"description": "Compile the sdk of your Bridge project with one command locally", | ||
@@ -5,0 +5,0 @@ "author": "Bridge Team <support@bridge.codes>", |
52854
1217