diff --git a/frontend/src/utils/async-form/async-form.js b/frontend/src/utils/async-form/async-form.js index 17f2c0810..1365150c6 100644 --- a/frontend/src/utils/async-form/async-form.js +++ b/frontend/src/utils/async-form/async-form.js @@ -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); } }