Skip to content

Commit 21cf2d8

Browse files
committed
fix: do not mutate args
1 parent d83d9a2 commit 21cf2d8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "reggol",
33
"description": "Logger for professionals",
4-
"version": "2.0.0",
4+
"version": "2.0.1",
55
"sideEffects": false,
66
"type": "module",
77
"exports": {

src/shared.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export class Logger {
7979
for (const exporter of this._factory.exporters.values()) {
8080
const targetLevel = exporter.levels?.[this.name] ?? exporter.levels?.default ?? Level.INFO
8181
if (targetLevel < level) continue
82-
const body = this._format(exporter, args)
82+
const body = this._format(exporter, args.slice())
8383
const message: Message = { ...this._meta, sn, ts, type, level, name: this.name, body }
8484
exporter.export(message)
8585
}

0 commit comments

Comments
 (0)