Skip to content

Commit 409ef55

Browse files
committed
Grouped ternary in initDefaultVal() for desired precedence ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions/tree/main/googlegpt]
1 parent 317345c commit 409ef55

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

chatgpt/googlegpt/googlegpt.user.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
// @description:zu Yengeza izimpendulo ze-AI ku-Google Search (inikwa amandla yi-Google Gemma + GPT-4o!)
150150
// @author KudoAI
151151
// @namespace https://kudoai.com
152-
// @version 2025.5.26.5
152+
// @version 2025.5.26.6
153153
// @license MIT
154154
// @icon https://assets.googlegpt.io/images/icons/app/black/icon48.png?v=12a91c0
155155
// @icon64 https://assets.googlegpt.io/images/icons/app/black/icon64.png?v=12a91c0
@@ -531,8 +531,7 @@
531531
keys.flat().forEach(key => config[key] = GM_getValue(`${app.configKeyPrefix}_${key}`, initDefaultVal(key)))
532532
function initDefaultVal(key) {
533533
return this.controls?.[key]?.defaultVal
534-
?? this.controls?.[key]?.type == 'slider' ? 100
535-
: this.controls?.[key]?.type == 'toggle'
534+
?? ( this.controls?.[key]?.type == 'slider' ? 100 : this.controls?.[key]?.type == 'toggle' )
536535
}
537536
},
538537
save(key, val) { GM_setValue(`${app.configKeyPrefix}_${key}`, val) ; config[key] = val }

0 commit comments

Comments
 (0)