Skip to content

Commit

Permalink
No IE11
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrookes committed Aug 29, 2020
1 parent dff69bd commit 759ef67
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/material-ui/src/ImageList/ImageList.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@ const ImageList = React.forwardRef(function ImageList(props, ref) {

const contextValue = React.useMemo(() => ({ cellHeight, spacing }), [cellHeight, spacing]);

React.useEffect(() => {
if (process.env.NODE_ENV !== 'production') {
// Detect Internet Explorer 8+
if (window !== undefined && window.document.documentMode) {
console.error(
[
"Material-UI: ImageList v5+ no longer supports Internet Explorer.",
'Use v4 of this component instead.',
].join('\n'),
);
}
}
}, []);

return (
<Component
className={clsx(classes.root, className)}
Expand Down

0 comments on commit 759ef67

Please sign in to comment.