diff --git a/src/utils.js b/src/utils.js index 209ab4f9b..c1c8effb1 100644 --- a/src/utils.js +++ b/src/utils.js @@ -113,6 +113,9 @@ export function deprecated(propType, explanation) { }; } +// Shim Element if needed (e.g. in Node environment) +const Element = typeof window === 'object' && window.Element || function() {}; + export function DOMElement(props, propName, componentName) { if (!(props[propName] instanceof Element)) { return new Error(