From a5a040f700df9adf0c7c7aab8a2946fd12630673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20G=C3=BCndel?= <5798652+sto3psl@users.noreply.github.com> Date: Mon, 27 Apr 2020 14:02:40 +0200 Subject: [PATCH] fix: check if __dw.vis is defined --- lib/Chart.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Chart.svelte b/lib/Chart.svelte index 5de343cd..57a0463c 100644 --- a/lib/Chart.svelte +++ b/lib/Chart.svelte @@ -298,7 +298,7 @@ Please make sure you called __(key) with a key of type "string". }); async function checkHeightAndRender() { - if (globalThis.__dw) { + if (globalThis.__dw && globalThis.__dw.vis) { const currentHeight = __dw.vis.size()[1]; await tick(); /* check after tick to get the new values after browser had time for layout and paint */