zjsunit: Truncate the stack trace only at run_one_module.

Commit 5bd73ce190 (#17367)
unintentionally truncated more of the traceback rather than less when
there’s more than one Module._compile frame.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2021-03-13 09:47:11 -08:00 committed by Steve Howell
parent 9c3f526fae
commit 9275489134
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ Module.prototype.hot = {
function short_tb(tb) {
const lines = tb.split("\n");
const i = lines.findIndex((line) => line.includes("Module._compile"));
const i = lines.findIndex((line) => line.includes("run_one_module"));
if (i === -1) {
return tb;