Skip to content

Commit

Permalink
Add explicit export form destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
tfedor committed Aug 28, 2024
1 parent a02e8d8 commit 0e2f345
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/js/Content/Features/Store/Wishlist/FExportWishlist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,19 +120,21 @@ export default class FExportWishlist extends Feature<CWishlist> {

private async showDialog(): Promise<void> {

let form: ExportWishlistForm|undefined;

const observer = new MutationObserver(() => {
const modal = document.querySelector("#as_export_form");
if (modal) {
const form = new ExportWishlistForm({
form = new ExportWishlistForm({
target: modal,
props: {
type: this.type,
format: this.format
}
});
form.$on("setup", () => {
this.format = form.format;
this.type = form.type;
this.format = form!.format;
this.type = form!.type;
});
observer.disconnect();
}
Expand All @@ -150,6 +152,8 @@ export default class FExportWishlist extends Feature<CWishlist> {
L(__export_copyClipboard)
);

form?.$destroy();

if (response === "CANCEL") {
return;
}
Expand Down

0 comments on commit 0e2f345

Please sign in to comment.