diff --git a/src/client/app/data.ts b/src/client/app/data.ts index 3e3fa7a2..cea5a8a8 100644 --- a/src/client/app/data.ts +++ b/src/client/app/data.ts @@ -31,8 +31,10 @@ export const siteDataRef: Ref = shallowRef( // hmr if (import.meta.hot) { - import.meta.hot!.accept('/@siteData', (m) => { - siteDataRef.value = m.default + import.meta.hot.accept('/@siteData', (m) => { + if (m) { + siteDataRef.value = m.default + } }) }