diff --git a/core/src/components/col/col.tsx b/core/src/components/col/col.tsx index e36f6207f1e..932952659b5 100644 --- a/core/src/components/col/col.tsx +++ b/core/src/components/col/col.tsx @@ -3,8 +3,8 @@ import { Component, ComponentInterface, Host, Listen, Prop, forceUpdate, h } fro import { getIonMode } from '../../global/ionic-global'; import { matchBreakpoint } from '../../utils/media'; -const win = window as any; -const SUPPORTS_VARS = !!(win.CSS && win.CSS.supports && win.CSS.supports('--a: 0')); +const win = (typeof (window as any) !== 'undefined') ? window as any : undefined; +const SUPPORTS_VARS = win && !!(win.CSS && win.CSS.supports && win.CSS.supports('--a: 0')); const BREAKPOINTS = ['', 'xs', 'sm', 'md', 'lg', 'xl']; @Component({