Skip to content

Commit

Permalink
fix: prevent using HTMLElement in SSR context (#3107)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeripeierSBB authored Sep 23, 2024
1 parent 8397d86 commit 333e90e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/react/core/create-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export const createComponent = <I extends HTMLElement, E extends EventNames = {}
}: Options<I, E>): ReactWebComponent<I, E> => {
const eventProps = new Set(Object.keys(events ?? {}));

if (DEV_MODE) {
if (DEV_MODE && !NODE_MODE) {
for (const p of reservedReactProperties) {
if (p in elementClass.prototype && !(p in HTMLElement.prototype)) {
// Note, this effectively warns only for `ref` since the other
Expand Down

0 comments on commit 333e90e

Please sign in to comment.