提交 c9bea301 编写于 作者: Y yiminghe

guard window

上级 87298086
...@@ -2,15 +2,18 @@ require('./style/index.less'); ...@@ -2,15 +2,18 @@ require('./style/index.less');
// matchMedia polyfill for // matchMedia polyfill for
// https://github.com/WickyNilliams/enquire.js/issues/82 // https://github.com/WickyNilliams/enquire.js/issues/82
window.matchMedia = window.matchMedia || function () { if (typeof window !== 'undefined') {
return { const matchMediaPolyfill = function matchMediaPolyfill() {
matches: false, return {
addListener: function () { matches: false,
}, addListener: function () {
removeListener: function () { },
} removeListener: function () {
}
};
}; };
}; window.matchMedia = window.matchMedia || matchMediaPolyfill;
}
const antd = { const antd = {
Affix: require('./components/affix'), Affix: require('./components/affix'),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册