requestidlecallback-polyfill
requestidlecallback-polyfill copied to clipboard
Prevent code from running on server side (add support for Next.js SSR)
When using this library with Next.js and their Server Side Generation, I ran into an issue where the rendering server will return an error:
ReferenceError: window is not defined
This PR fixes that issue and allows us to skip this code on the server, but continue running on the client side.
we need this
+1, need this!