Browse Source

Trace will print even without message (#3193)

pull/3199/head
Kelbaz 1 year ago committed by GitHub
parent
commit
f3a0ff0971
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 20
      boa_runtime/src/console/mod.rs

20
boa_runtime/src/console/mod.rs

@ -354,18 +354,18 @@ impl Console {
) -> JsResult<JsValue> {
if !args.is_empty() {
logger(LogMessage::Log(formatter(args, context)?), console);
let stack_trace_dump = context
.stack_trace()
.map(|frame| frame.code_block().name())
.collect::<Vec<_>>()
.into_iter()
.map(JsString::to_std_string_escaped)
.collect::<Vec<_>>()
.join("\n");
logger(LogMessage::Log(stack_trace_dump), console);
}
let stack_trace_dump = context
.stack_trace()
.map(|frame| frame.code_block().name())
.collect::<Vec<_>>()
.into_iter()
.map(JsString::to_std_string_escaped)
.collect::<Vec<_>>()
.join("\n");
logger(LogMessage::Log(stack_trace_dump), console);
Ok(JsValue::undefined())
}

Loading…
Cancel
Save