Skip to content

Commit 4a489fd

Browse files
committed
Grouped ternary in initDefaultVal() for desired precedence ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions/tree/main/duckduckgpt]
1 parent c7548df commit 4a489fd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

chatgpt/duckduckgpt/duckduckgpt.user.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
// @description:zu Yengeza izimpendulo ze-AI ku-DuckDuckGo (inikwa amandla yi-GPT-4o!)
149149
// @author KudoAI
150150
// @namespace https://kudoai.com
151-
// @version 2025.5.26.5
151+
// @version 2025.5.26.6
152152
// @license MIT
153153
// @icon https://assets.ddgpt.com/images/icons/app/icon48.png?v=533ce0f
154154
// @icon64 https://assets.ddgpt.com/images/icons/app/icon64.png?v=533ce0f
@@ -341,8 +341,7 @@
341341
keys.flat().forEach(key => config[key] = GM_getValue(`${app.configKeyPrefix}_${key}`, initDefaultVal(key)))
342342
function initDefaultVal(key) {
343343
return this.controls?.[key]?.defaultVal
344-
?? this.controls?.[key]?.type == 'slider' ? 100
345-
: this.controls?.[key]?.type == 'toggle'
344+
?? ( this.controls?.[key]?.type == 'slider' ? 100 : this.controls?.[key]?.type == 'toggle' )
346345
}
347346
},
348347
save(key, val) { GM_setValue(`${app.configKeyPrefix}_${key}`, val) ; config[key] = val }

0 commit comments

Comments
 (0)