Skip to content

Commit

Permalink
fix(overlay): handle missing customElements (#4856)
Browse files Browse the repository at this point in the history
  • Loading branch information
daaku committed Sep 6, 2021
1 parent c588b8f commit e5b472d
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 e5b472d

Please sign in to comment.