Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch error from failing to unobserve #8578

Merged
merged 2 commits into from
Sep 16, 2019
Merged

Conversation

ijjk
Copy link
Member

@ijjk ijjk commented Aug 30, 2019

It seems some versions (v.15) of MS Edge will throw an error on IntersectionObserver#unobserve so this adds catching of it since it's not a critical error if it fails to unobserve

Fixes: #8572

@ijjk
Copy link
Member Author

ijjk commented Aug 30, 2019

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
zeit/next.js canary ijjk/next.js handle-unobserve Change
buildDuration 22.3s 22.1s -169ms
nodeModulesSize 42 MB 42 MB ⚠️ +150 B
Client Bundles (main, webpack, commons) Overall increase ⚠️
zeit/next.js canary ijjk/next.js handle-unobserve Change
main-HASH.js 18.2 kB 18.2 kB ⚠️ +1 B
main-HASH.js gzip 6.64 kB 6.64 kB ⚠️ +1 B
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
Overall change ⚠️ +1 B
Client Bundles (main, webpack, commons) Modern Overall increase ⚠️
zeit/next.js canary ijjk/next.js handle-unobserve Change
main-HASH.module.js 16.5 kB 16.5 kB ⚠️ +1 B
main-HASH.module.js gzip 6.37 kB 6.38 kB ⚠️ +1 B
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
Overall change ⚠️ +1 B
Client Pages Overall increase ⚠️
zeit/next.js canary ijjk/next.js handle-unobserve Change
_app.js 1.83 kB 1.83 kB
_app.js gzip 884 B 884 B
_error.js 12.1 kB 12.1 kB
_error.js gzip 4.76 kB 4.76 kB -1 B
hooks.js 12.7 kB 12.7 kB
hooks.js gzip 4.81 kB 4.81 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 8.14 kB 8.15 kB ⚠️ +14 B
link.js gzip 3.49 kB 3.5 kB ⚠️ +11 B
routerDirect.js 434 B 433 B -1 B
routerDirect.js gzip 296 B 296 B
withRouter.js 444 B 444 B
withRouter.js gzip 294 B 294 B
Overall change ⚠️ +13 B
Client Pages Modern Overall increase ⚠️
zeit/next.js canary ijjk/next.js handle-unobserve Change
_app.module.js 1.73 kB 1.73 kB
_app.module.js gzip 840 B 840 B
_error.module.js 23.3 kB 23.3 kB
_error.module.js gzip 8.62 kB 8.62 kB
hooks.module.js 1.55 kB 1.55 kB
hooks.module.js gzip 805 B 804 B -1 B
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 8.52 kB 8.54 kB ⚠️ +14 B
link.module.js gzip 3.68 kB 3.69 kB ⚠️ +10 B
routerDirect.module.js 419 B 419 B
routerDirect.module.js gzip 294 B 294 B
withRouter.module.js 430 B 429 B -1 B
withRouter.module.js gzip 293 B 293 B
Overall change ⚠️ +13 B
Client Build Manifests
zeit/next.js canary ijjk/next.js handle-unobserve Change
_buildManifest.js 81 B 81 B
_buildManifest.js gzip 61 B 61 B
_buildManifest.module.js 81 B 81 B
_buildManifest.module.js gzip 61 B 61 B
Overall change
Rendered Page Sizes Overall increase ⚠️
zeit/next.js canary ijjk/next.js handle-unobserve Change
index.html 3.69 kB 3.7 kB ⚠️ +3 B
index.html gzip 955 B 955 B
link.html 3.74 kB 3.75 kB ⚠️ +3 B
link.html gzip 963 B 963 B
withRouter.html 3.75 kB 3.75 kB ⚠️ +3 B
withRouter.html gzip 950 B 950 B
Overall change ⚠️ +9 B

Diffs

Diff for link.js
@@ -512,7 +512,12 @@ var listenToIntersections = function listenToIntersections(el, cb) {
   observer.observe(el);
   listeners.set(el, cb);
   return function () {
-    observer.unobserve(el);
+    try {
+      observer.unobserve(el);
+    } catch (_) {
+      /* not detrimental if it fails to unobserve */
+    }
+
     listeners["delete"](el);
   };
 };
Diff for link.module.js
@@ -560,7 +560,12 @@ const listenToIntersections = (el, cb) => {
   observer.observe(el);
   listeners.set(el, cb);
   return () => {
-    observer.unobserve(el);
+    try {
+      observer.unobserve(el);
+    } catch (_) {
+      /* not detrimental if it fails to unobserve */
+    }
+
     listeners.delete(el);
   };
 };
Diff for index.html
@@ -6,9 +6,9 @@
         <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"
         />
         <meta name="next-head-count" content="2" />
-        <link rel="preload" href="/_next/static/DUHwChV0pR2RMNFd0ZGZ0/pages/index.module.js"
+        <link rel="preload" href="/_next/static/e1mCLszSk5q8ebYSs_5G6/pages/index.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/DUHwChV0pR2RMNFd0ZGZ0/pages/_app.module.js"
+        <link rel="preload" href="/_next/static/e1mCLszSk5q8ebYSs_5G6/pages/_app.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/runtime/webpack-7928590be3ef2e55b835.module.js"
         as="script" crossorigin="anonymous" />
@@ -16,9 +16,9 @@
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/chunks/bcmbIASzacRLDf1hvJ6uLeOeTuA=.c659a74b6088e6ac1abe.module.js"
+        <link rel="preload" href="/_next/static/chunks/GTfuCIlnKJfTg9AQ02NezdgwvlM=.c659a74b6088e6ac1abe.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/DUHwChV0pR2RMNFd0ZGZ0/_buildManifest.module.js"
+        <link rel="preload" href="/_next/static/e1mCLszSk5q8ebYSs_5G6/_buildManifest.module.js"
         as="script" crossorigin="anonymous" />
     </head>
     
@@ -26,18 +26,18 @@
         <div id="__next">Hello world 👋</div>
         <script id="__NEXT_DATA__" type="application/json"
         crossorigin="anonymous">
-            {"dataManager":"[]","props":{"pageProps":{}},"page":"/","query":{},"buildId":"DUHwChV0pR2RMNFd0ZGZ0"}
+            {"dataManager":"[]","props":{"pageProps":{}},"page":"/","query":{},"buildId":"e1mCLszSk5q8ebYSs_5G6"}
         </script>
         <script crossorigin="anonymous" nomodule="">
             !function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();
         </script>
-        <script async="" data-next-page="/" src="/_next/static/DUHwChV0pR2RMNFd0ZGZ0/pages/index.js"
+        <script async="" data-next-page="/" src="/_next/static/e1mCLszSk5q8ebYSs_5G6/pages/index.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/" src="/_next/static/DUHwChV0pR2RMNFd0ZGZ0/pages/index.module.js"
+        <script async="" data-next-page="/" src="/_next/static/e1mCLszSk5q8ebYSs_5G6/pages/index.module.js"
         crossorigin="anonymous" type="module"></script>
-        <script async="" data-next-page="/_app" src="/_next/static/DUHwChV0pR2RMNFd0ZGZ0/pages/_app.js"
+        <script async="" data-next-page="/_app" src="/_next/static/e1mCLszSk5q8ebYSs_5G6/pages/_app.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/_app" src="/_next/static/DUHwChV0pR2RMNFd0ZGZ0/pages/_app.module.js"
+        <script async="" data-next-page="/_app" src="/_next/static/e1mCLszSk5q8ebYSs_5G6/pages/_app.module.js"
         crossorigin="anonymous" type="module"></script>
         <script src="/_next/static/runtime/webpack-a470c2a25bcb4d5a8ec0.js"
         async="" crossorigin="anonymous" nomodule=""></script>
@@ -51,15 +51,15 @@
         async="" crossorigin="anonymous" nomodule=""></script>
         <script src="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/chunks/TMSnqQwEfx2rTZjuchVHl77QY=.155621535702fe040780.js"
+        <script src="/_next/static/chunks/M5Fg6iLQxkzmO16qv1mUVsX7I=.155621535702fe040780.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/bcmbIASzacRLDf1hvJ6uLeOeTuA=.f6f7599a2edf91d8366a.js"
+        <script src="/_next/static/chunks/GTfuCIlnKJfTg9AQ02NezdgwvlM=.f6f7599a2edf91d8366a.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/bcmbIASzacRLDf1hvJ6uLeOeTuA=.c659a74b6088e6ac1abe.module.js"
+        <script src="/_next/static/chunks/GTfuCIlnKJfTg9AQ02NezdgwvlM=.c659a74b6088e6ac1abe.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/DUHwChV0pR2RMNFd0ZGZ0/_buildManifest.js"
+        <script src="/_next/static/e1mCLszSk5q8ebYSs_5G6/_buildManifest.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/DUHwChV0pR2RMNFd0ZGZ0/_buildManifest.module.js"
+        <script src="/_next/static/e1mCLszSk5q8ebYSs_5G6/_buildManifest.module.js"
         async="" crossorigin="anonymous" type="module"></script>
     </body>
Diff for link.html
@@ -6,19 +6,19 @@
         <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"
         />
         <meta name="next-head-count" content="2" />
-        <link rel="preload" href="/_next/static/DUHwChV0pR2RMNFd0ZGZ0/pages/link.module.js"
+        <link rel="preload" href="/_next/static/e1mCLszSk5q8ebYSs_5G6/pages/link.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/DUHwChV0pR2RMNFd0ZGZ0/pages/_app.module.js"
+        <link rel="preload" href="/_next/static/e1mCLszSk5q8ebYSs_5G6/pages/_app.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/runtime/webpack-7928590be3ef2e55b835.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/chunks/bcmbIASzacRLDf1hvJ6uLeOeTuA=.c659a74b6088e6ac1abe.module.js"
+        <link rel="preload" href="/_next/static/chunks/GTfuCIlnKJfTg9AQ02NezdgwvlM=.c659a74b6088e6ac1abe.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/runtime/main-b34dfc4fd33bc7bccca0.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/DUHwChV0pR2RMNFd0ZGZ0/_buildManifest.module.js"
+        <link rel="preload" href="/_next/static/e1mCLszSk5q8ebYSs_5G6/_buildManifest.module.js"
         as="script" crossorigin="anonymous" />
     </head>
     
@@ -29,18 +29,18 @@
             </div>
         </div>
         <script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">
-            {"dataManager":"[]","props":{"pageProps":{}},"page":"/link","query":{},"buildId":"DUHwChV0pR2RMNFd0ZGZ0"}
+            {"dataManager":"[]","props":{"pageProps":{}},"page":"/link","query":{},"buildId":"e1mCLszSk5q8ebYSs_5G6"}
         </script>
         <script crossorigin="anonymous" nomodule="">
             !function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();
         </script>
-        <script async="" data-next-page="/link" src="/_next/static/DUHwChV0pR2RMNFd0ZGZ0/pages/link.js"
+        <script async="" data-next-page="/link" src="/_next/static/e1mCLszSk5q8ebYSs_5G6/pages/link.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/link" src="/_next/static/DUHwChV0pR2RMNFd0ZGZ0/pages/link.module.js"
+        <script async="" data-next-page="/link" src="/_next/static/e1mCLszSk5q8ebYSs_5G6/pages/link.module.js"
         crossorigin="anonymous" type="module"></script>
-        <script async="" data-next-page="/_app" src="/_next/static/DUHwChV0pR2RMNFd0ZGZ0/pages/_app.js"
+        <script async="" data-next-page="/_app" src="/_next/static/e1mCLszSk5q8ebYSs_5G6/pages/_app.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/_app" src="/_next/static/DUHwChV0pR2RMNFd0ZGZ0/pages/_app.module.js"
+        <script async="" data-next-page="/_app" src="/_next/static/e1mCLszSk5q8ebYSs_5G6/pages/_app.module.js"
         crossorigin="anonymous" type="module"></script>
         <script src="/_next/static/runtime/webpack-a470c2a25bcb4d5a8ec0.js"
         async="" crossorigin="anonymous" nomodule=""></script>
@@ -50,19 +50,19 @@
         async="" crossorigin="anonymous" nomodule=""></script>
         <script src="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/chunks/TMSnqQwEfx2rTZjuchVHl77QY=.155621535702fe040780.js"
+        <script src="/_next/static/chunks/M5Fg6iLQxkzmO16qv1mUVsX7I=.155621535702fe040780.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/bcmbIASzacRLDf1hvJ6uLeOeTuA=.f6f7599a2edf91d8366a.js"
+        <script src="/_next/static/chunks/GTfuCIlnKJfTg9AQ02NezdgwvlM=.f6f7599a2edf91d8366a.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/bcmbIASzacRLDf1hvJ6uLeOeTuA=.c659a74b6088e6ac1abe.module.js"
+        <script src="/_next/static/chunks/GTfuCIlnKJfTg9AQ02NezdgwvlM=.c659a74b6088e6ac1abe.module.js"
         async="" crossorigin="anonymous" type="module"></script>
         <script src="/_next/static/runtime/main-2cd30e118423b74fdb03.js"
         async="" crossorigin="anonymous" nomodule=""></script>
         <script src="/_next/static/runtime/main-b34dfc4fd33bc7bccca0.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/DUHwChV0pR2RMNFd0ZGZ0/_buildManifest.js"
+        <script src="/_next/static/e1mCLszSk5q8ebYSs_5G6/_buildManifest.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/DUHwChV0pR2RMNFd0ZGZ0/_buildManifest.module.js"
+        <script src="/_next/static/e1mCLszSk5q8ebYSs_5G6/_buildManifest.module.js"
         async="" crossorigin="anonymous" type="module"></script>
     </body>
Diff for withRouter.html
@@ -6,19 +6,19 @@
         <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"
         />
         <meta name="next-head-count" content="2" />
-        <link rel="preload" href="/_next/static/DUHwChV0pR2RMNFd0ZGZ0/pages/withRouter.module.js"
+        <link rel="preload" href="/_next/static/e1mCLszSk5q8ebYSs_5G6/pages/withRouter.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/DUHwChV0pR2RMNFd0ZGZ0/pages/_app.module.js"
+        <link rel="preload" href="/_next/static/e1mCLszSk5q8ebYSs_5G6/pages/_app.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/runtime/webpack-7928590be3ef2e55b835.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/chunks/bcmbIASzacRLDf1hvJ6uLeOeTuA=.c659a74b6088e6ac1abe.module.js"
+        <link rel="preload" href="/_next/static/chunks/GTfuCIlnKJfTg9AQ02NezdgwvlM=.c659a74b6088e6ac1abe.module.js"
         as="script" crossorigin="anonymous" />
         <link rel="preload" href="/_next/static/runtime/main-b34dfc4fd33bc7bccca0.module.js"
         as="script" crossorigin="anonymous" />
-        <link rel="preload" href="/_next/static/DUHwChV0pR2RMNFd0ZGZ0/_buildManifest.module.js"
+        <link rel="preload" href="/_next/static/e1mCLszSk5q8ebYSs_5G6/_buildManifest.module.js"
         as="script" crossorigin="anonymous" />
     </head>
     
@@ -27,18 +27,18 @@
             <div>I use withRouter</div>
         </div>
         <script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">
-            {"dataManager":"[]","props":{"pageProps":{}},"page":"/withRouter","query":{},"buildId":"DUHwChV0pR2RMNFd0ZGZ0"}
+            {"dataManager":"[]","props":{"pageProps":{}},"page":"/withRouter","query":{},"buildId":"e1mCLszSk5q8ebYSs_5G6"}
         </script>
         <script crossorigin="anonymous" nomodule="">
             !function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();
         </script>
-        <script async="" data-next-page="/withRouter" src="/_next/static/DUHwChV0pR2RMNFd0ZGZ0/pages/withRouter.js"
+        <script async="" data-next-page="/withRouter" src="/_next/static/e1mCLszSk5q8ebYSs_5G6/pages/withRouter.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/withRouter" src="/_next/static/DUHwChV0pR2RMNFd0ZGZ0/pages/withRouter.module.js"
+        <script async="" data-next-page="/withRouter" src="/_next/static/e1mCLszSk5q8ebYSs_5G6/pages/withRouter.module.js"
         crossorigin="anonymous" type="module"></script>
-        <script async="" data-next-page="/_app" src="/_next/static/DUHwChV0pR2RMNFd0ZGZ0/pages/_app.js"
+        <script async="" data-next-page="/_app" src="/_next/static/e1mCLszSk5q8ebYSs_5G6/pages/_app.js"
         crossorigin="anonymous" nomodule=""></script>
-        <script async="" data-next-page="/_app" src="/_next/static/DUHwChV0pR2RMNFd0ZGZ0/pages/_app.module.js"
+        <script async="" data-next-page="/_app" src="/_next/static/e1mCLszSk5q8ebYSs_5G6/pages/_app.module.js"
         crossorigin="anonymous" type="module"></script>
         <script src="/_next/static/runtime/webpack-a470c2a25bcb4d5a8ec0.js"
         async="" crossorigin="anonymous" nomodule=""></script>
@@ -48,19 +48,19 @@
         async="" crossorigin="anonymous" nomodule=""></script>
         <script src="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/chunks/TMSnqQwEfx2rTZjuchVHl77QY=.155621535702fe040780.js"
+        <script src="/_next/static/chunks/M5Fg6iLQxkzmO16qv1mUVsX7I=.155621535702fe040780.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/bcmbIASzacRLDf1hvJ6uLeOeTuA=.f6f7599a2edf91d8366a.js"
+        <script src="/_next/static/chunks/GTfuCIlnKJfTg9AQ02NezdgwvlM=.f6f7599a2edf91d8366a.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/chunks/bcmbIASzacRLDf1hvJ6uLeOeTuA=.c659a74b6088e6ac1abe.module.js"
+        <script src="/_next/static/chunks/GTfuCIlnKJfTg9AQ02NezdgwvlM=.c659a74b6088e6ac1abe.module.js"
         async="" crossorigin="anonymous" type="module"></script>
         <script src="/_next/static/runtime/main-2cd30e118423b74fdb03.js"
         async="" crossorigin="anonymous" nomodule=""></script>
         <script src="/_next/static/runtime/main-b34dfc4fd33bc7bccca0.module.js"
         async="" crossorigin="anonymous" type="module"></script>
-        <script src="/_next/static/DUHwChV0pR2RMNFd0ZGZ0/_buildManifest.js"
+        <script src="/_next/static/e1mCLszSk5q8ebYSs_5G6/_buildManifest.js"
         async="" crossorigin="anonymous" nomodule=""></script>
-        <script src="/_next/static/DUHwChV0pR2RMNFd0ZGZ0/_buildManifest.module.js"
+        <script src="/_next/static/e1mCLszSk5q8ebYSs_5G6/_buildManifest.module.js"
         async="" crossorigin="anonymous" type="module"></script>
     </body>

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
zeit/next.js canary ijjk/next.js handle-unobserve Change
buildDuration 23.6s 23.4s -180ms
nodeModulesSize 42 MB 42 MB ⚠️ +150 B
Client Bundles (main, webpack, commons)
zeit/next.js canary ijjk/next.js handle-unobserve Change
main-HASH.js 18.2 kB 18.2 kB
main-HASH.js gzip 6.64 kB 6.64 kB
webpack-HASH.js 1.53 kB 1.53 kB
webpack-HASH.js gzip 746 B 746 B
Overall change
Client Bundles (main, webpack, commons) Modern
zeit/next.js canary ijjk/next.js handle-unobserve Change
main-HASH.module.js 16.5 kB 16.5 kB
main-HASH.module.js gzip 6.38 kB 6.38 kB
webpack-HASH.module.js 1.53 kB 1.53 kB
webpack-HASH.module.js gzip 746 B 746 B
Overall change
Client Pages Overall increase ⚠️
zeit/next.js canary ijjk/next.js handle-unobserve Change
_app.js 1.83 kB 1.83 kB
_app.js gzip 884 B 884 B
_error.js 12.1 kB 12.1 kB
_error.js gzip 4.76 kB 4.76 kB
hooks.js 12.7 kB 12.7 kB
hooks.js gzip 4.81 kB 4.81 kB
index.js 343 B 343 B
index.js gzip 237 B 237 B
link.js 8.14 kB 8.15 kB ⚠️ +14 B
link.js gzip 3.49 kB 3.5 kB ⚠️ +12 B
routerDirect.js 433 B 433 B
routerDirect.js gzip 296 B 296 B
withRouter.js 444 B 444 B
withRouter.js gzip 294 B 294 B
Overall change ⚠️ +14 B
Client Pages Modern Overall increase ⚠️
zeit/next.js canary ijjk/next.js handle-unobserve Change
_app.module.js 1.73 kB 1.73 kB
_app.module.js gzip 840 B 840 B
_error.module.js 23.3 kB 23.3 kB
_error.module.js gzip 8.62 kB 8.62 kB
hooks.module.js 1.55 kB 1.55 kB
hooks.module.js gzip 804 B 804 B
index.module.js 319 B 319 B
index.module.js gzip 238 B 238 B
link.module.js 8.52 kB 8.54 kB ⚠️ +14 B
link.module.js gzip 3.68 kB 3.69 kB ⚠️ +10 B
routerDirect.module.js 419 B 419 B
routerDirect.module.js gzip 294 B 294 B
withRouter.module.js 429 B 429 B
withRouter.module.js gzip 293 B 293 B
Overall change ⚠️ +14 B
Client Build Manifests
zeit/next.js canary ijjk/next.js handle-unobserve Change
_buildManifest.js 81 B 81 B
_buildManifest.js gzip 61 B 61 B
_buildManifest.module.js 81 B 81 B
_buildManifest.module.js gzip 61 B 61 B
Overall change
Serverless bundles Overall increase ⚠️
zeit/next.js canary ijjk/next.js handle-unobserve Change
_error.js 247 kB 247 kB ⚠️ +21 B
_error.js gzip 66.3 kB 66.5 kB ⚠️ +158 B
hooks.html 3.81 kB 3.81 kB ⚠️ +7 B
hooks.html gzip 981 B 985 B ⚠️ +4 B
index.js 248 kB 248 kB ⚠️ +21 B
index.js gzip 66.6 kB 66.6 kB -37 B
link.js 255 kB 256 kB ⚠️ +111 B
link.js gzip 68.9 kB 69 kB ⚠️ +75 B
routerDirect.js 249 kB 249 kB ⚠️ +21 B
routerDirect.js gzip 66.8 kB 66.9 kB ⚠️ +107 B
withRouter.js 249 kB 249 kB ⚠️ +21 B
withRouter.js gzip 66.7 kB 66.7 kB -8 B
Overall change ⚠️ +202 B

try {
observer.unobserve(el)
} catch (_) {
/* not detrimental if it fails to unobserve */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be console.error(err)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to be a browser bug so should we log it out even though the user can't address it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, otherwise it will completely disappear.

@Timer Timer added this to the 9.0.7 milestone Sep 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

<Link> with prefetch: true throws error in Edge v.15
3 participants