Skip to content

Commit 9c3c230

Browse files
authored
chore: fix warnings and errors in demo (#839)
* chore: suppress warning in demo * chore: prevent multiple intializations of esbuild-wasm in demo HMR
1 parent 001cc1a commit 9c3c230

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

demo/CodeGen.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@ const transformedCode = ref("");
7878
const transformErrors = ref([]);
7979
8080
onMounted(async () => {
81-
await initialize({ wasmURL });
81+
// prevent multiple initializations during HMR
82+
if (!window.__esbuildInitialized) {
83+
await initialize({ wasmURL });
84+
window.__esbuildInitialized = true;
85+
}
8286
8387
initializing.value = false;
8488

demo/data/logo.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@ export default {
2020
},
2121
shape: `path://${d}`,
2222
label: {
23-
normal: {
24-
formatter() {
25-
return "";
26-
},
23+
formatter() {
24+
return "";
2725
},
2826
},
2927
itemStyle: {

demo/data/radar.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export const useScoreStore = defineStore("store", () => {
2727
fontWeight: 300,
2828
},
2929
radar: {
30+
splitNumber: 4,
3031
indicator: scores.value.map(({ name, max }, index) => {
3132
if (index === activeIndex) {
3233
return { name, max, color: "goldenrod" };

0 commit comments

Comments
 (0)