chore: handle undefined hmr (#831)

pull/837/head
翠 / green 2 years ago committed by GitHub
parent fdb5720acd
commit 8cbe0f9d41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -31,8 +31,10 @@ export const siteDataRef: Ref<SiteData> = shallowRef(
// hmr // hmr
if (import.meta.hot) { if (import.meta.hot) {
import.meta.hot!.accept('/@siteData', (m) => { import.meta.hot.accept('/@siteData', (m) => {
siteDataRef.value = m.default if (m) {
siteDataRef.value = m.default
}
}) })
} }

Loading…
Cancel
Save