Skip to content

Commit

Permalink
fix 'location is not defined' error
Browse files Browse the repository at this point in the history
  • Loading branch information
jakemmarsh committed May 11, 2015
1 parent d7d2d88 commit b8ed82c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils.js
Expand Up @@ -647,7 +647,7 @@ exports.stackTraceFilter = function() {
: { browser: true }
, cwd = is.node
? process.cwd() + slash
: location.href.replace(/\/[^\/]*$/, '/');
: (typeof location === 'undefined' ? window.location : location).href.replace(/\/[^\/]*$/, '/');

function isNodeModule (line) {
return (~line.indexOf('node_modules'));
Expand Down

0 comments on commit b8ed82c

Please sign in to comment.