Skip to content
This repository was archived by the owner on Jul 29, 2025. It is now read-only.

Commit 3aaf871

Browse files
4cm4k1Matt Goo
authored andcommitted
fix(ripple): Adds HTMLElement shim to fix regression for SSR projects (#592)
1 parent b11ed41 commit 3aaf871

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/ripple/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ import {Subtract} from 'utility-types'; // eslint-disable-line no-unused-vars
2626
// @ts-ignore no mdc .d.ts file
2727
import {MDCRippleFoundation, MDCRippleAdapter, util} from '@material/ripple/dist/mdc.ripple';
2828

29-
const MATCHES = util.getMatchesProperty(HTMLElement.prototype);
29+
const HTMLElementShim: any = typeof HTMLElement === 'undefined' ? {} : HTMLElement;
30+
const MATCHES = util.getMatchesProperty(HTMLElementShim.prototype);
3031

3132
export interface RippledComponentProps<T> {
3233
unbounded?: boolean;

0 commit comments

Comments
 (0)