Skip to content

Commit 32e61c9

Browse files
committed
Condensed console.error routine
1 parent 81f6942 commit 32e61c9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

chatgpt.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2132,11 +2132,10 @@ function toCamelCase(words) {
21322132
// Prefix console logs w/ '🤖 chatgpt.js >> '
21332133
const consolePrefix = '🤖 chatgpt.js >> ', ogError = console.error, ogInfo = console.info
21342134
console.error = (...args) => {
2135-
if (typeof args[0] === 'string') {
2135+
if (typeof args[0] == 'string') {
21362136
if (!args[0].startsWith(consolePrefix)) ogError(consolePrefix + args[0], ...args.slice(1))
21372137
else ogError(...args)
2138-
}
2139-
else ogError(consolePrefix, ...args)
2138+
} else ogError(consolePrefix, ...args)
21402139
}
21412140
console.info = (msg) => {
21422141
if (!msg.startsWith(consolePrefix)) ogInfo(consolePrefix + msg);

0 commit comments

Comments
 (0)