Fix/node custom elements (#5235)
* adapter-node fix CustomElementRegistry * Add changeset * Add fallback CustomElementRegistry
This commit is contained in:
parent
5be3fdec27
commit
b6a478f376
2 changed files with 8 additions and 2 deletions
5
.changeset/silly-mirrors-give.md
Normal file
5
.changeset/silly-mirrors-give.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@astrojs/webapi': patch
|
||||
---
|
||||
|
||||
Fix CustomElementRegistry for Node SSR Adapter
|
|
@ -81,8 +81,9 @@ export const initCustomElementRegistry = (
|
|||
const CustomElementRegistry =
|
||||
target.CustomElementRegistry || globalThis.CustomElementRegistry
|
||||
|
||||
const customElements: CustomElementRegistry = (target.customElements =
|
||||
Object.create(CustomElementRegistry.prototype))
|
||||
const customElements: CustomElementRegistry =
|
||||
target.customElements ||
|
||||
(target.customElements = new CustomElementRegistry())
|
||||
|
||||
_.INTERNALS.set(customElements, {
|
||||
constructorByName: new Map(),
|
||||
|
|
Loading…
Reference in a new issue