Skip to content

Commit 74b6802

Browse files
fix(polyfill): check that window exists before defining CustomEvent (reactstrap#1855)
1 parent 5da40b5 commit 74b6802

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/polyfill.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(() => {
2-
if ( typeof window.CustomEvent === 'function' ) return;
2+
if ( typeof window !== 'object' || typeof window.CustomEvent === 'function' ) return;
33

44
const CustomEvent = (( event, params ) => {
55
params = params || { bubbles: false, cancelable: false, detail: null };

0 commit comments

Comments
 (0)