Skip to content

Commit

Permalink
Merge pull request #1654 from jakemmarsh/location-fix
Browse files Browse the repository at this point in the history
fix 'location is not defined' error
  • Loading branch information
dasilvacontin committed May 15, 2015
2 parents ebe9cea + b8ed82c commit 7493bca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,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 7493bca

Please sign in to comment.