diff --git a/src/polyfill.js b/src/polyfill.js index 3c08c3e3e..a234ee5e0 100644 --- a/src/polyfill.js +++ b/src/polyfill.js @@ -1,5 +1,5 @@ (() => { - if ( typeof window.CustomEvent === 'function' ) return; + if ( typeof window !== 'object' || typeof window.CustomEvent === 'function' ) return; const CustomEvent = (( event, params ) => { params = params || { bubbles: false, cancelable: false, detail: null };