update comment

This commit is contained in:
Cynthia Long
2026-03-18 14:44:07 +00:00
parent 8ae078b4d7
commit 201efbd07f
+5 -7
View File
@@ -57,14 +57,12 @@ export class ConsolePatcher {
return;
}
}
// When it is stderr only mode, all console output redirect to stderr
// if it is debug mode.
if (this.params.stderr) {
if (type !== 'debug' || this.params.debugMode) {
// When it is in the debug mode, redirect console output to stderr
// depending on if it is stderr only mode.
if (type !== 'debug' || this.params.debugMode) {
if (this.params.stderr) {
this.originalConsoleError(this.formatArgs(args));
}
} else {
if (type !== 'debug' || this.params.debugMode) {
} else {
this.params.onNewMessage?.({
type,
content: this.formatArgs(args),