Skip to content

Commit

Permalink
put back a comment about mocked process in isBrowserEnvironment
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentfretin committed May 21, 2024
1 parent d26adfd commit b9392ec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/utils/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ module.exports.isLandscape = function () {
* We need to check a node api that isn't mocked on either side.
* `require` and `module.exports` are mocked in browser by bundlers.
* `window` is mocked in node.
* `process` is also mocked by webpack running with karma, but has custom properties like process.browser.
*/
module.exports.isBrowserEnvironment = typeof process === 'undefined' || process.browser === true;

Expand Down

0 comments on commit b9392ec

Please sign in to comment.