Skip to content

Commit

Permalink
fix navigator not defined : use onMount
Browse files Browse the repository at this point in the history
  • Loading branch information
eyssette committed Jul 20, 2024
1 parent dde5114 commit 9c3ac85
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/lib/Mindmap.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,15 @@
let nodeTitle;
let description;
$: description = $markdownSource;
let automaticResize = true;
const isMobile =
onMount(() => {
const isMobile =
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
navigator.userAgent
);
let automaticResize = isMobile ? false : true;
);
automaticResize = isMobile ? false : true;
})
let mm;
$: if (maxWidth<250) {
Expand Down

0 comments on commit 9c3ac85

Please sign in to comment.