fix bug with sync and deleting instance
This commit is contained in:
parent
a736c3019e
commit
46773d290d
@ -233,7 +233,9 @@ class InstanceCard extends HTMLElement {
|
||||
|
||||
const result = await requestAPI(`/cluster/${this.node.name}/${this.type}/${this.vmid}/delete`, "DELETE");
|
||||
if (result.status === 200) {
|
||||
this.parentElement.removeChild(this);
|
||||
if (this.parentElement) {
|
||||
this.parentElement.removeChild(this);
|
||||
}
|
||||
}
|
||||
else {
|
||||
alert(result.error);
|
||||
|
Loading…
Reference in New Issue
Block a user