From 28ea82f6004dfc09d219be5ef36f6a3f58a7891f Mon Sep 17 00:00:00 2001 From: exyi Date: Mon, 5 Oct 2020 21:23:12 +0000 Subject: [PATCH] Fix runtime warnings --- frontend/src/Graph.svelte | 4 ++-- frontend/src/main.ts | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/src/Graph.svelte b/frontend/src/Graph.svelte index 8925a09..88ff49a 100644 --- a/frontend/src/Graph.svelte +++ b/frontend/src/Graph.svelte @@ -18,8 +18,8 @@ // Svelte automatically fills these with a reference let container: HTMLElement; - let clientHeight: number; - let clientWidth: number; + let clientHeight: number = window.innerHeight; + let clientWidth: number = window.innerWidth; let svgElement: SVGElement; let innerSvgGroup: SVGElement; let selectionRectangle: [[number, number], [number, number]] | null = null; diff --git a/frontend/src/main.ts b/frontend/src/main.ts index 7b37e0a..65190cf 100644 --- a/frontend/src/main.ts +++ b/frontend/src/main.ts @@ -3,7 +3,6 @@ import App from './App.svelte'; const app = new App({ target: document.getElementById("svelte-root")!, props: { - name: 'world' } });