fix(codeAreaModal): move postCustomComponent call outside of the else block to ensure it is always executed
This commit is contained in:
parent
da4be03451
commit
0d6293de17
1 changed files with 7 additions and 7 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue