mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 11:39:28 +08:00
fix next.js serverless error (#18541)
https://github.com/zeit/next.js/issues/8151
This commit is contained in:
parent
b029e38705
commit
414de6b5c9
@ -1,4 +1,4 @@
|
|||||||
function isStyleSupport(styleName: string | Array<string>): boolean {
|
const isStyleSupport = (styleName: string | Array<string>): boolean => {
|
||||||
if (typeof window !== 'undefined' && window.document && window.document.documentElement) {
|
if (typeof window !== 'undefined' && window.document && window.document.documentElement) {
|
||||||
const styleNameList = Array.isArray(styleName) ? styleName : [styleName];
|
const styleNameList = Array.isArray(styleName) ? styleName : [styleName];
|
||||||
const { documentElement } = window.document;
|
const { documentElement } = window.document;
|
||||||
|
Loading…
Reference in New Issue
Block a user