Skip to content

Commit

Permalink
fix(polyfill): check that window exists before defining CustomEvent (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
justinbrumley committed Jun 24, 2020
1 parent 5da40b5 commit 74b6802
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 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 };
Expand Down

0 comments on commit 74b6802

Please sign in to comment.