fix(async-form): destroy all after response is processed

This commit is contained in:
Johannes Eder 2021-08-06 13:50:32 +02:00 committed by Sarah Vaupel
parent fc7d5dc94e
commit 14a16c7283

View File

@ -60,6 +60,7 @@ export class AsyncForm {
setTimeout(() => {
parentElement.insertBefore(responseElement, this._element);
this._element.remove();
this._app.utilRegistry.destroyAll(this._element);
}, delay);
}
@ -102,6 +103,5 @@ export class AsyncForm {
this._processResponse({ content: failureMessage });
this._element.classList.remove(ASYNC_FORM_LOADING_CLASS);
});
this._app.utilRegistry.destroyAll(this._element);
}
}