Skip to content

Commit 146a11b

Browse files
committed
Grouped ternary in initDefaultVal() for desired precedence ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions/tree/main/chatgpt-auto-talk]
1 parent 5099e37 commit 146a11b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

chatgpt/chatgpt-auto-talk/chatgpt-auto-talk.user.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@
225225
// @description:zu Dlala izimpendulo ze-ChatGPT ngokuzenzakalela
226226
// @author Adam Lui
227227
// @namespace https://github.com/adamlui
228-
// @version 2025.5.26.2
228+
// @version 2025.5.26.3
229229
// @license MIT
230230
// @icon https://assets.chatgptautotalk.com/images/icons/openai/black/icon48.png?v=9f1ed3c
231231
// @icon64 https://assets.chatgptautotalk.com/images/icons/openai/black/icon64.png?v=9f1ed3c
@@ -332,8 +332,7 @@
332332
keys.flat().forEach(key => config[key] = GM_getValue(`${app.configKeyPrefix}_${key}`, initDefaultVal(key)))
333333
function initDefaultVal(key) {
334334
return this.controls?.[key]?.defaultVal
335-
?? this.controls?.[key]?.type == 'slider' ? 100
336-
: this.controls?.[key]?.type == 'toggle'
335+
?? ( this.controls?.[key]?.type == 'slider' ? 100 : this.controls?.[key]?.type == 'toggle' )
337336
}
338337
},
339338

0 commit comments

Comments
 (0)