From 315e61a33d5dd8f721e45a4722092f57baf5b24a Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 17 Aug 2015 15:12:59 +0800 Subject: [PATCH] fix react-slick bug via adding matchMedia polyfill --- index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/index.js b/index.js index c6a07cbb06..ea3c9711ca 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,15 @@ require('./style/index.less'); +// matchMedia polyfill for +// https://github.com/WickyNilliams/enquire.js/issues/82 +window.matchMedia = window.matchMedia || function() { + return { + matches : false, + addListener : function() {}, + removeListener: function() {} + }; +}; + var antd = { Affix: require('./components/affix'), Datepicker: require('./components/datepicker'),