Skip to content

Commit b39acb3

Browse files
committed
fixing 'Hydration completed but contains mismatches.' error in netlify console
1 parent a721715 commit b39acb3

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

src/components/Ontologies/OntologySunburst.vue

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
<template>
22
<div class="highcharts-wrapper">
3-
<highcharts
4-
v-if="!loadingData && isBrowser && modulesReady"
5-
:options="sunburstOptions"
6-
/>
3+
<ClientOnly>
4+
<highcharts
5+
v-if="!loadingData && isBrowser && modulesReady"
6+
:options="sunburstOptions"
7+
/>
8+
</ClientOnly>
79
</div>
810
</template>
911

1012
<script>
13+
import { ClientOnly } from "vike-vue/ClientOnly";
1114
import { defineAsyncComponent } from "vue";
1215
import { mapActions, mapGetters, mapState } from "vuex";
1316
import { useTheme } from "vuetify";
1417
1518
export default {
1619
name: "OntologySunburst",
1720
components: {
21+
ClientOnly,
1822
highcharts: defineAsyncComponent(() =>
1923
import("highcharts-vue").then(
2024
(module) => module.Chart || module.default.Chart || module,
@@ -194,10 +198,7 @@ export default {
194198
}
195199
196200
//Flip flag strictly AFTER modules attach to Highcharts
197-
this.$nextTick(() => {
198-
this.isBrowser = true;
199-
this.modulesReady = true;
200-
});
201+
this.modulesReady = true;
201202
}
202203
203204
if (this.tree) {

0 commit comments

Comments
 (0)