Skip to content

Commit

Permalink
fix: load empty document when unloading card iframe
Browse files Browse the repository at this point in the history
Previously this was setting a blank URL which caused relative
document to load, causing some exceptions in the console.
  • Loading branch information
micwallace committed Nov 24, 2023
1 parent 9c5a315 commit 2cb1f43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export class CardPopover implements IViewBinding {
async unloadTokenView() {
await this.dialog.closeDialog();
this.currentCard = null;
this.iframe.contentWindow.location.replace("");
this.iframe.contentWindow.location.replace("data:text/html;base64,PCFET0NUWVBFIGh0bWw+");
history.replaceState(undefined, undefined, "/");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export abstract class AbstractViewBinding implements IViewBinding {
async unloadTokenView() {
this.currentCard = null;
this.actionBar.style.display = "none";
this.iframe.contentWindow.location.replace("");
this.iframe.contentWindow.location.replace("data:text/html;base64,PCFET0NUWVBFIGh0bWw+");
history.replaceState(undefined, undefined, "/");
}

Expand Down

0 comments on commit 2cb1f43

Please sign in to comment.