Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Update utils.js #118

Closed
wants to merge 4 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,9 @@ function parseStack(err, cb) {
lineno: line.getLineNumber(),
'function': getFunction(line),
}, isInternal = line.isNative() ||
(frame.filename[0] !== '/' &&
frame.filename[0] !== '.');
(frame.filename[0] !== path.sep &&
frame.filename[0] !== '.' &&
frame.filename.indexOf(':\\') != 1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this supposed to be :\\ or :\? Also, can you switch it to be a strict inequality check? !==

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's just one backslash but it has to be escaped with another one inside the string. I am now changing the inequality check.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, derp. You're right. :)


// in_app is all that's not an internal Node function or a module within node_modules
frame.in_app = !isInternal && !~frame.filename.indexOf('node_modules/');
Expand Down