diff --git a/components/style/index.tsx b/components/style/index.tsx index 9dbe3759a0..c8281622ef 100644 --- a/components/style/index.tsx +++ b/components/style/index.tsx @@ -6,7 +6,7 @@ function isFlexSupported(style) { 'MozFlex' in style; } -if (typeof window !== undefined && window.document && window.document.documentElement) { +if (typeof window !== 'undefined' && window.document && window.document.documentElement) { const { documentElement } = window.document; const NO_FLEX = 'no-flex';