fix(ssr): fix global window and document references (#17590)

This commit is contained in:
Adam Bradley
2019-02-22 20:13:09 -06:00
committed by GitHub
parent 6bea9d3248
commit 4646f53ec7
18 changed files with 76 additions and 70 deletions

View File

@ -92,7 +92,7 @@ export class Router implements ComponentInterface {
@Method()
push(url: string, direction: RouterDirection = 'forward') {
if (url.startsWith('.')) {
url = (new URL(url, window.location.href)).pathname;
url = (new URL(url, this.win.location.href)).pathname;
}
console.debug('[ion-router] URL pushed -> updating nav', url, direction);