We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c22a5dc commit ff1d9b6Copy full SHA for ff1d9b6
src/utils/device.js
@@ -171,8 +171,9 @@ export function isLandscape () {
171
* Check if running in a browser or spoofed browser (bundler).
172
* We need to check a node api that isn't mocked on either side.
173
* `require` and `module.exports` are mocked in browser by bundlers.
174
+ * process is polyfilled with process.browser true by Next.js with "use client".
175
*/
-export var isBrowserEnvironment = typeof process === 'undefined';
176
+export var isBrowserEnvironment = typeof process === 'undefined' || process.browser === true;
177
178
/**
179
* Check if running in node on the server.
0 commit comments