Skip to content

Commit 1533ea1

Browse files
committedMay 15, 2015
stack: don't read indexOf if file is unset
1 parent 22680b0 commit 1533ea1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎lib/stack.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,9 @@ function parseLine (line) {
195195
column: +col
196196
}
197197

198-
if (res.file.indexOf(cwd + '/') === 0 ||
199-
res.file.indexOf(cwd + '\\') === 0)
198+
if (res.file &&
199+
(res.file.indexOf(cwd + '/') === 0 ||
200+
res.file.indexOf(cwd + '\\') === 0))
200201
res.file = res.file.substr(cwd.length + 1)
201202

202203
if (ctor)

0 commit comments

Comments
 (0)
Please sign in to comment.