fix(codeAreaModal): move postCustomComponent call outside of the else block to ensure it is always executed

This commit is contained in:
anovazzi1 2023-07-04 15:51:32 -03:00
commit 0d6293de17

View file

@ -104,6 +104,7 @@ export default function CodeAreaModal({
} }
else else
{ {
}
postCustomComponent(code, nodeClass).then((apiReturn) => { postCustomComponent(code, nodeClass).then((apiReturn) => {
const {data} = apiReturn; const {data} = apiReturn;
if (data) { if (data) {
@ -111,7 +112,6 @@ export default function CodeAreaModal({
setModalOpen(false); setModalOpen(false);
} }
}); });
}
// axios.get("/api/v1/custom_component_error").catch((err) => { // axios.get("/api/v1/custom_component_error").catch((err) => {
// console.log(err.response.data); // console.log(err.response.data);
// setError(err.response.data); // setError(err.response.data);