Skip to content

Commit

Permalink
Closes mochajs#1764: use process.browser to detect env
Browse files Browse the repository at this point in the history
  • Loading branch information
anmuel committed Apr 7, 2018
1 parent 7544bd3 commit c0e32a7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -547,8 +547,7 @@ exports.getError = function (err) {
* @returns {Function}
*/
exports.stackTraceFilter = function () {
// TODO: Replace with `process.browser`
var is = typeof document === 'undefined' ? { node: true } : { browser: true };
var is = process.browser ? { browser: true } : { node: true };
var slash = path.sep;
var cwd;
if (is.node) {
Expand Down

0 comments on commit c0e32a7

Please sign in to comment.