Skip to content

Commit

Permalink
Merge pull request #672 from klacointe/sprocket_stacktrace
Browse files Browse the repository at this point in the history
Oups… Fix code ordering for sprocket stacktrace…
  • Loading branch information
arthurnn committed Mar 24, 2014
2 parents f3689b3 + a0bb2db commit 1ddf715
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions public/javascripts/notifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -1150,17 +1150,17 @@ printStackTrace.implementation.prototype = {
continue;
}

if (stacktrace[i].indexOf('@') === -1) {
stacktrace[i] += '@unsupported.js';
}

// Special case for sprocket coffee stacktrace:
// "Function.foo (http://host/file.js?body=1:666:42)" becomes "Function.foo @http://host/file.js?body=1:666"
if (stacktrace[i].match(/\([^\s]+:(\d+):(\d+)\)$/)) {
stacktrace[i] = stacktrace[i].replace(/\((.+):(\d+):(\d+)\)$/, '@$1:$2')
continue;
}

if (stacktrace[i].indexOf('@') === -1) {
stacktrace[i] += '@unsupported.js';
}

stacktrace[i] += ':0';
}

Expand Down

0 comments on commit 1ddf715

Please sign in to comment.