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,14 +104,14 @@ export default function CodeAreaModal({
|
|||
}
|
||||
else
|
||||
{
|
||||
postCustomComponent(code, nodeClass).then((apiReturn) => {
|
||||
const {data} = apiReturn;
|
||||
if (data) {
|
||||
setNodeClass(data);
|
||||
setModalOpen(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
postCustomComponent(code, nodeClass).then((apiReturn) => {
|
||||
const {data} = apiReturn;
|
||||
if (data) {
|
||||
setNodeClass(data);
|
||||
setModalOpen(false);
|
||||
}
|
||||
});
|
||||
// axios.get("/api/v1/custom_component_error").catch((err) => {
|
||||
// console.log(err.response.data);
|
||||
// setError(err.response.data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue