Skip to content

Commit

Permalink
Added type conversion to log.info() to prevent uncaught exceptions …
Browse files Browse the repository at this point in the history
…in TM (Tampermonkey/tampermonkey#2158) ↞ [auto-sync from `adamlui/chatgpt-apps`]
  • Loading branch information
adamlui authored and kudo-sync-bot committed Aug 24, 2024
1 parent 16edba1 commit 8ca48e7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions greasemonkey/googlegpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
// @description:zu Yengeza izimpendulo ze-AI ku-Google Search (inikwa amandla yi-Google Gemma + GPT-4o!)
// @author KudoAI
// @namespace https://kudoai.com
// @version 2024.8.24.4
// @version 2024.8.24.5
// @license MIT
// @icon https://media.googlegpt.io/images/icons/googlegpt/black/icon48.png?8652a6e
// @icon64 https://media.googlegpt.io/images/icons/googlegpt/black/icon64.png?8652a6e
Expand Down Expand Up @@ -771,7 +771,8 @@
}

const log = {
info(msg) { console.info(`${ config.appSymbol } ${ config.appName } » ${ log.prefix || '' }${ msg }`) },
info(msg) {console.info(`${ config.appSymbol } ${ config.appName } » ${ log.prefix || '' }${
typeof label == 'msg' ? JSON.stringify(msg) : msg }`) },

Check failure on line 775 in greasemonkey/googlegpt.user.js

View workflow job for this annotation

GitHub Actions / eslint

Invalid typeof comparison value
err(label, msg) { console.error( `${config.appSymbol} ${config.appName} » ${ log.prefix || '' }${
typeof label == 'object' ? JSON.stringify(label) : label }${ msg ? `: ${msg}` : ''}`)}
}
Expand Down

0 comments on commit 8ca48e7

Please sign in to comment.