提交 c9bea301 编写于 作者: Y yiminghe

guard window

上级 87298086
......@@ -2,15 +2,18 @@ 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 () {
}
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'),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册