mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-03 00:09:39 +08:00
14 lines
295 B
JavaScript
14 lines
295 B
JavaScript
|
// fixed jsdom miss
|
||
|
if (typeof window !== 'undefined') {
|
||
|
const matchMediaPolyfill = function matchMediaPolyfill() {
|
||
|
return {
|
||
|
matches: false,
|
||
|
addListener() {
|
||
|
},
|
||
|
removeListener() {
|
||
|
},
|
||
|
};
|
||
|
};
|
||
|
window.matchMedia = window.matchMedia || matchMediaPolyfill;
|
||
|
}
|