Skip to content

Commit cdc294e

Browse files
authored
fix: elementClass.prototype undefined error with corejs polyfill (#5)
1 parent afbd653 commit cdc294e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/ce-la-react.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ export function createComponent<I extends HTMLElement, E extends EventNames = {}
218218
// a primitive value that should be set as an attribute and will
219219
// internally be reflected to the accompanying property.
220220
if (
221+
elementClass.prototype &&
221222
k in elementClass.prototype &&
222223
!(k in (globalThis.HTMLElement?.prototype ?? {})) &&
223224
!elementClass.observedAttributes?.some((attr) => attr === attrName)

0 commit comments

Comments
 (0)