We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7803213 + 35e70ec commit bd0643eCopy full SHA for bd0643e
chatgpt.js
@@ -2132,8 +2132,11 @@ function toCamelCase(words) {
2132
// Prefix console logs w/ '🤖 chatgpt.js >> '
2133
const consolePrefix = '🤖 chatgpt.js >> ', ogError = console.error, ogInfo = console.info
2134
console.error = (...args) => {
2135
- if (!args[0].startsWith(consolePrefix)) ogError(consolePrefix + args[0], ...args.slice(1))
2136
- else ogError(...args)
+ if (typeof args[0] === 'string') {
+ if (!args[0].startsWith(consolePrefix)) ogError(consolePrefix + args[0], ...args.slice(1))
2137
+ else ogError(...args)
2138
+ }
2139
+ else ogError(consolePrefix, ...args)
2140
}
2141
console.info = (msg) => {
2142
if (!msg.startsWith(consolePrefix)) ogInfo(consolePrefix + msg);
0 commit comments