Skip to content

Commit b4b3486

Browse files
committed
add computed message
1 parent 463618a commit b4b3486

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/core/src/integrations/consola.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,9 @@ export function createConsolaReporter(options: ConsolaReporterOptions = {}): Con
246246
// Extra keys on logObj (beyond reserved) indicate direct `reporter.log({ type, message, ...rest })`
247247
if (hasExtraLogObjKeys && args && args.length >= 1 && typeof args[0] === 'string') {
248248
// Use first 'string' arg as message
249-
const message = args[0];
249+
const computedMessage = args[0] || message;
250250

251-
_INTERNAL_captureLog({ level: logSeverityLevel, message, attributes });
251+
_INTERNAL_captureLog({ level: logSeverityLevel, message: computedMessage, attributes });
252252
return;
253253
}
254254

0 commit comments

Comments
 (0)