Skip to content

last line of leading multiline message remains in cleaned stack #53

@boneskull

Description

@boneskull
// in REPL
const StackUtils = require('stack-utils');
const stack = new StackUtils();
try {
  throw new TypeError(`foo
bar
baz`);
} catch (err) {
  console.log(stack.clean(err.stack));
}

actual:

baz
    REPL18:2:9

expected:

either the entire message or none of it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions