Skip to content
Browse files

Make sure MutationObserver is used in Safari as well (#488)

* make sure MutationObserver is used in Safari as well

* explicitly check for 'undefined' instead of using 'window'
  • Loading branch information...
1 parent f9fa814 commit 8a7785a3f8bc405f82b429434b6dbdab418f745c @sachavdb sachavdb committed with briancavalier Apr 28, 2016
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/env.js
View
4 lib/env.js
@@ -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) {

0 comments on commit 8a7785a

Please sign in to comment.
Something went wrong with that request. Please try again.