Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
feat: #4 fix lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
pamapa committed Oct 1, 2021
1 parent ac9b307 commit f14b8c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/navigators/PopupWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class PopupWindow implements IWindow {

this._id = params.id;
if (this._id) {
(window as any)["popupCallback_" + params.id!] = this._callback;
(window as any)["popupCallback_" + this._id] = this._callback;
}

this._popup.focus();
Expand Down Expand Up @@ -113,7 +113,10 @@ export class PopupWindow implements IWindow {

window.removeEventListener("message", this._messageReceived);

delete (window as any)["popupCallback_" + this._id!];
if (this._id) {
delete (window as any)["popupCallback_" + this._id];
}
this._id = undefined;

if (this._popup && !keepOpen) {
this._popup.close();
Expand Down
2 changes: 1 addition & 1 deletion src/navigators/RedirectNavigator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class RedirectNavigator implements INavigator, IWindow {
throw new Error("No url provided");
}

window.location[this._redirectMethod!](params.url);
window.location[this._redirectMethod || "assign"](params.url);
return { url: window.location.href };
}

Expand Down

0 comments on commit f14b8c9

Please sign in to comment.