diff --git a/dist/index.js b/dist/index.js index 5443c412..0ac74b9f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -80,7 +80,7 @@ canceled: !1 }, args); }, exports.MutationObserver = function() { - for (var prefixes = [ "", "WebKit", "Moz", "O", "Ms" ], i = 0; i < prefixes.length; i++) { + if ("undefined" != typeof window) for (var prefixes = [ "", "WebKit", "Moz", "O", "Ms" ], i = 0; i < prefixes.length; i++) { var name = prefixes[i] + "MutationObserver"; if (name in window) return window[name]; } diff --git a/dist/ssr.index.js b/dist/ssr.index.js index 6eef97e7..9522af1f 100644 --- a/dist/ssr.index.js +++ b/dist/ssr.index.js @@ -80,7 +80,7 @@ canceled: !1 }, args); }, exports.MutationObserver = function() { - for (var prefixes = [ "", "WebKit", "Moz", "O", "Ms" ], i = 0; i < prefixes.length; i++) { + if ("undefined" != typeof window) for (var prefixes = [ "", "WebKit", "Moz", "O", "Ms" ], i = 0; i < prefixes.length; i++) { var name = prefixes[i] + "MutationObserver"; if (name in window) return window[name]; } diff --git a/dist/ssr.nocss.js b/dist/ssr.nocss.js index a02fb33a..f244f148 100644 --- a/dist/ssr.nocss.js +++ b/dist/ssr.nocss.js @@ -80,7 +80,7 @@ canceled: !1 }, args); }, exports.MutationObserver = function() { - for (var prefixes = [ "", "WebKit", "Moz", "O", "Ms" ], i = 0; i < prefixes.length; i++) { + if ("undefined" != typeof window) for (var prefixes = [ "", "WebKit", "Moz", "O", "Ms" ], i = 0; i < prefixes.length; i++) { var name = prefixes[i] + "MutationObserver"; if (name in window) return window[name]; } diff --git a/src/util.js b/src/util.js index 936b0bb5..cce3b61c 100644 --- a/src/util.js +++ b/src/util.js @@ -32,7 +32,7 @@ export const createModalEvent = (args = {}) => { } export const MutationObserver = (() => { - if (typeof window !== 'undefined')) { + if (typeof window !== 'undefined') { const prefixes = ['', 'WebKit', 'Moz', 'O', 'Ms'] for (let i = 0; i < prefixes.length; i++) {