We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 411d25f commit 9adb170Copy full SHA for 9adb170
packages/core/src/client/overlay.ts
@@ -1,4 +1,4 @@
1
-import { registerOverlay } from './hmr'
+import { registerOverlay } from './hmr';
2
3
function stripAnsi(content: string) {
4
const pattern = [
@@ -163,7 +163,7 @@ const overlayTemplate = `
163
const {
164
HTMLElement = class {} as typeof globalThis.HTMLElement,
165
customElements,
166
-} = globalThis;
+} = typeof window !== 'undefined' ? window : globalThis;
167
168
class ErrorOverlay extends HTMLElement {
169
constructor(message: string[]) {
0 commit comments