Skip to content

Commit

Permalink
fix(overlay): handle missing customElements (vitejs#4856)
Browse files Browse the repository at this point in the history
  • Loading branch information
daaku authored and aleclarson committed Nov 8, 2021
1 parent c5e5e81 commit 01224f1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/vite/src/client/overlay.ts
Expand Up @@ -182,4 +182,6 @@ export class ErrorOverlay extends HTMLElement {
}

export const overlayId = 'vite-error-overlay'
!customElements.get(overlayId) && customElements.define(overlayId, ErrorOverlay)
if (customElements && !customElements.get(overlayId)) {
customElements.define(overlayId, ErrorOverlay)
}

0 comments on commit 01224f1

Please sign in to comment.