Skip to content

Commit

Permalink
Make sure MutationObserver is used in Safari as well (#488)
Browse files Browse the repository at this point in the history
* make sure MutationObserver is used in Safari as well

* explicitly check for 'undefined' instead of using 'window'
  • Loading branch information
sachavdb authored and briancavalier committed Apr 28, 2016
1 parent f9fa814 commit 8a7785a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/env.js
Expand Up @@ -47,8 +47,8 @@ define(function(require) {
}

function hasMutationObserver () {
return (typeof MutationObserver === 'function' && MutationObserver) ||
(typeof WebKitMutationObserver === 'function' && WebKitMutationObserver);
return (typeof MutationObserver !== 'undefined' && MutationObserver) ||
(typeof WebKitMutationObserver !== 'undefined' && WebKitMutationObserver);
}

function initMutationObserver(MutationObserver) {
Expand Down

0 comments on commit 8a7785a

Please sign in to comment.