Fix error on broken image
This commit is contained in:
parent
6db0c3fc19
commit
310eb0bc78
1 changed files with 7 additions and 1 deletions
|
@ -59,12 +59,18 @@ export function initializeInstanceDetailsDialog(
|
||||||
};
|
};
|
||||||
|
|
||||||
form.addEventListener("submit", e => {
|
form.addEventListener("submit", e => {
|
||||||
|
let image: string | null = null;
|
||||||
|
if (instanceIcon.src !== blankImage) {
|
||||||
|
try {
|
||||||
|
image = resize(instanceIcon);
|
||||||
|
} catch { }
|
||||||
|
}
|
||||||
callback(
|
callback(
|
||||||
instanceName.value,
|
instanceName.value,
|
||||||
instanceHost.value,
|
instanceHost.value,
|
||||||
instanceHostSecure.checked,
|
instanceHostSecure.checked,
|
||||||
instanceSoftware.value,
|
instanceSoftware.value,
|
||||||
instanceIcon.src == blankImage ? null : resize(instanceIcon)
|
image
|
||||||
);
|
);
|
||||||
form.reset();
|
form.reset();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue