Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
improve reliability of the browser/node check
this fixes compatibility with a popular GTAV modification framework, FiveM. they define the window object as an alias for global, so the check was always returning true, causing various problems.
  • Loading branch information
vecchiotom committed Sep 5, 2018
1 parent 9c2924a commit 963c965
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/Constants.js
@@ -1,6 +1,6 @@
const Package = exports.Package = require('../../package.json');
const { Error, RangeError } = require('../errors');
const browser = exports.browser = typeof window !== 'undefined';
const browser = exports.browser = typeof process === 'undefined';

/**
* Options for a client.
Expand Down

0 comments on commit 963c965

Please sign in to comment.