Skip to content
This repository has been archived by the owner on Sep 13, 2021. It is now read-only.

Commit

Permalink
fix: check if __dw.vis is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
sto3psl committed Apr 27, 2020
1 parent c68cd17 commit a5a040f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Chart.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit a5a040f

Please sign in to comment.