From 3aaf871b677294ce4b5880173e8597b0890256bf Mon Sep 17 00:00:00 2001 From: Anthony Maki <4cm4k1@gmail.com> Date: Fri, 4 Jan 2019 13:19:41 -0600 Subject: [PATCH] fix(ripple): Adds HTMLElement shim to fix regression for SSR projects (#592) --- packages/ripple/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/ripple/index.tsx b/packages/ripple/index.tsx index 867065c60..3d2c42f34 100644 --- a/packages/ripple/index.tsx +++ b/packages/ripple/index.tsx @@ -26,7 +26,8 @@ import {Subtract} from 'utility-types'; // eslint-disable-line no-unused-vars // @ts-ignore no mdc .d.ts file import {MDCRippleFoundation, MDCRippleAdapter, util} from '@material/ripple/dist/mdc.ripple'; -const MATCHES = util.getMatchesProperty(HTMLElement.prototype); +const HTMLElementShim: any = typeof HTMLElement === 'undefined' ? {} : HTMLElement; +const MATCHES = util.getMatchesProperty(HTMLElementShim.prototype); export interface RippledComponentProps { unbounded?: boolean;