Network: Do not consider page parameters if not running in the browser
In preparation for SSR
This commit is contained in:
parent
d28c611806
commit
208cfa8e0d
1 changed files with 9 additions and 3 deletions
|
@ -1,8 +1,14 @@
|
|||
import { writable } from 'svelte/store';
|
||||
import { browser } from '$app/environment'
|
||||
|
||||
let authKey = undefined;
|
||||
let controlUrl = undefined;
|
||||
if(browser)
|
||||
{
|
||||
let params = new URLSearchParams("?"+window.location.hash.substr(1));
|
||||
let authKey = params.get("authKey") || undefined;
|
||||
let controlUrl = params.get("controlUrl") || undefined;
|
||||
authKey = params.get("authKey");
|
||||
controlUrl = params.get("controlUrl");
|
||||
}
|
||||
let dashboardUrl = controlUrl ? null : "https://login.tailscale.com/admin/machines";
|
||||
let resolveLogin = null;
|
||||
let loginPromise = new Promise((f,r) => {
|
||||
|
|
Loading…
Reference in a new issue