Skip to content

Commit 317345c

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

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

chatgpt/amazongpt/amazongpt.user.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// @description Add AI chat & product/category summaries to Amazon shopping, powered by the latest LLMs like GPT-4o!
44
// @author KudoAI
55
// @namespace https://kudoai.com
6-
// @version 2025.5.26.5
6+
// @version 2025.5.26.6
77
// @license MIT
88
// @icon https://amazongpt.kudoai.com/assets/images/icons/app/black-gold-teal/icon48.png?v=8e8ed1c
99
// @icon64 https://amazongpt.kudoai.com/assets/images/icons/app/black-gold-teal/icon64.png?v=8e8ed1c
@@ -218,8 +218,7 @@
218218
keys.flat().forEach(key => config[key] = GM_getValue(`${app.configKeyPrefix}_${key}`, initDefaultVal(key)))
219219
function initDefaultVal(key) {
220220
return this.controls?.[key]?.defaultVal
221-
?? this.controls?.[key]?.type == 'slider' ? 100
222-
: this.controls?.[key]?.type == 'toggle'
221+
?? ( this.controls?.[key]?.type == 'slider' ? 100 : this.controls?.[key]?.type == 'toggle' )
223222
}
224223
},
225224
save(key, val) { GM_setValue(`${app.configKeyPrefix}_${key}`, val) ; config[key] = val }

0 commit comments

Comments
 (0)