Skip to content

Commit

Permalink
custom format style undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
Shirtiny committed Jan 29, 2023
1 parent 0358c3b commit 80b3fb9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/model/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ export class Logger extends BaseLogger {

protected customFormat(
level: number,
pairs: {str: string, style: string}[],
pairs: {str: string, style?: string}[],
...data: any[]
) {
if (!this.isLevelAllowed(level)) return;
const content = "%c" + pairs.map((p) => p.str).join("%c");
const descStyles = pairs.map((p) => p.style)
const descStyles = pairs.map((p) => p.style);
super.log(content, ...descStyles, ...data);
}

Expand Down

0 comments on commit 80b3fb9

Please sign in to comment.