fix next.js serverless error (#18541)

https://github.com/zeit/next.js/issues/8151
This commit is contained in:
Tay Zheng Yu 2019-08-29 13:57:33 +08:00 committed by 偏右
parent b029e38705
commit 414de6b5c9

View File

@ -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;