mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
move matchMedia polyfill to carousel
This commit is contained in:
parent
d50460724a
commit
3597e6a576
@ -1,3 +1,18 @@
|
||||
// matchMedia polyfill for
|
||||
// https://github.com/WickyNilliams/enquire.js/issues/82
|
||||
if (typeof window !== 'undefined') {
|
||||
const matchMediaPolyfill = function matchMediaPolyfill() {
|
||||
return {
|
||||
matches: false,
|
||||
addListener: function () {
|
||||
},
|
||||
removeListener: function () {
|
||||
}
|
||||
};
|
||||
};
|
||||
window.matchMedia = window.matchMedia || matchMediaPolyfill;
|
||||
}
|
||||
|
||||
import Carousel from 'react-slick';
|
||||
import React from 'react';
|
||||
import assign from 'object-assign';
|
||||
|
15
index.js
15
index.js
@ -2,21 +2,6 @@ import React from 'react';
|
||||
|
||||
require('./style/index.less');
|
||||
|
||||
// matchMedia polyfill for
|
||||
// https://github.com/WickyNilliams/enquire.js/issues/82
|
||||
if (typeof window !== 'undefined') {
|
||||
const matchMediaPolyfill = function matchMediaPolyfill() {
|
||||
return {
|
||||
matches: false,
|
||||
addListener: function () {
|
||||
},
|
||||
removeListener: function () {
|
||||
}
|
||||
};
|
||||
};
|
||||
window.matchMedia = window.matchMedia || matchMediaPolyfill;
|
||||
}
|
||||
|
||||
const antd = {
|
||||
Affix: require('./components/affix'),
|
||||
Datepicker: require('./components/datepicker'),
|
||||
|
Loading…
Reference in New Issue
Block a user