1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 07:13:32 +00:00

reload popup fix

This commit is contained in:
Kyle Spearrin
2018-01-12 12:41:51 -05:00
parent 839bd4e8fc
commit 9597e76e92

View File

@@ -34,13 +34,12 @@ export default class RuntimeBackground {
// Reload the popup when it's opened // Reload the popup when it's opened
this.runtime.addEventListener('popover', (event: any) => { this.runtime.addEventListener('popover', (event: any) => {
const win: Window = event.target.contentWindow; const win: Window = event.target.contentWindow;
const body = win.document.body; const href = win.location.origin + win.location.pathname;
let child: Node = body.firstChild; if(win.location.toString() === href) {
while (child) { win.location.reload();
body.removeChild(child); } else {
child = body.firstChild; win.location.href = href;
} }
win.location.reload();
}, true); }, true);
return; return;