🐛 Fix a bug with the openedUrl

Fixes #337
This commit is contained in:
ajnart
2022-08-12 15:09:45 +02:00
parent 85b1a2d7da
commit 48e1808992

View File

@@ -172,6 +172,7 @@ export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } &
onSubmit={form.onSubmit(() => {
const newForm = { ...form.values };
if (newForm.newTab === true) newForm.newTab = undefined;
if (newForm.openedUrl === '') newForm.openedUrl = undefined;
if (newForm.category === null) newForm.category = undefined;
if (newForm.status.length === 1 && newForm.status[0] === '200') {
delete newForm.status;