Fix stack trace edge case

This commit is contained in:
Gilbert 2018-05-17 00:05:54 -05:00 committed by Pierre-Yves Gérardy
parent 64b1e47e66
commit 0f498e0aec

View file

@ -72,7 +72,7 @@ else window.o = m()
}
if (ospecFileName == null) return stack.join("\n")
// skip ospec-related entries on the stack
while (stack[i].indexOf(ospecFileName) !== -1) i++
while (stack[i] && stack[i].indexOf(ospecFileName) !== -1) i++
// now we're in user code
return stack[i]
}