Skip to content

Commit

Permalink
format the input if contain formatting specifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
justjavac committed Dec 14, 2018
1 parent 71fd5e6 commit 0bf078d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion js/console.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,13 @@ export class Console {
return;
}

this.error("Assertion failed:", ...args);
const [first, ...rest] = args;

if (typeof first === "string") {
this.error(`Assertion failed: ${first}`, ...rest);
return
}

this.error(`Assertion failed:`, ...args);
};
}

0 comments on commit 0bf078d

Please sign in to comment.