]> cat aescling's git repositories - mastodon.git/commitdiff
Load extra polyfills when isIntersecting is undefined (#4469)
authorYamagishi Kazutoshi <ykzts@desire.sh>
Mon, 31 Jul 2017 17:40:20 +0000 (02:40 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 31 Jul 2017 17:40:20 +0000 (19:40 +0200)
app/javascript/mastodon/load_polyfills.js

index df78891180a30c1307030ba4cb8fb547f7c7e566..8927b735855ebae0389f96afdfd4bdf245b21cc3 100644 (file)
@@ -24,6 +24,8 @@ function loadPolyfills() {
   // This avoids shipping them all the polyfills.
   const needsExtraPolyfills = !(
     window.IntersectionObserver &&
+    window.IntersectionObserverEntry &&
+    'isIntersecting' in IntersectionObserverEntry.prototype &&
     window.requestIdleCallback &&
     'object-fit' in (new Image()).style
   );