diff options
Diffstat (limited to 'client/src/components/GameCanvas.svelte')
-rw-r--r-- | client/src/components/GameCanvas.svelte | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/client/src/components/GameCanvas.svelte b/client/src/components/GameCanvas.svelte index ed16f33..ea7dd15 100644 --- a/client/src/components/GameCanvas.svelte +++ b/client/src/components/GameCanvas.svelte @@ -3,7 +3,7 @@ import { loadAssets } from "@engine/config"; import { Game } from "@engine/Game"; import { JumpStorm } from "../JumpStorm"; - + let canvas: HTMLCanvasElement; let ctx: CanvasRenderingContext2D; @@ -19,8 +19,7 @@ const game = new Game(); const jumpStorm = new JumpStorm(game); - const url = new URL(document.location); - await jumpStorm.init(ctx, "http", "ws", url.host + "/api"); + await jumpStorm.init(ctx, "http", "ws", document.location.host + "/api"); jumpStorm.play(); }); </script> |