Skip to content

Commit

Permalink
Replaced || w/ ?? in settings.load() for proper nullish val han…
Browse files Browse the repository at this point in the history
  • Loading branch information
kudo-sync-bot committed Jan 12, 2025
1 parent 0d84b86 commit 843d291
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chatgpt/amazongpt/amazongpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// @description Adds the magic of AI to Amazon shopping
// @author KudoAI
// @namespace https://kudoai.com
// @version 2025.1.11.1
// @version 2025.1.11.2
// @license MIT
// @icon https://amazongpt.kudoai.com/assets/images/icons/amazongpt/black-gold-teal/icon48.png?v=0fddfc7
// @icon64 https://amazongpt.kudoai.com/assets/images/icons/amazongpt/black-gold-teal/icon64.png?v=0fddfc7
Expand Down Expand Up @@ -232,7 +232,7 @@
load(...keys) {
keys.flat().forEach(key => {
config[key] = GM_getValue(`${app.configKeyPrefix}_${key}`,
this.controls?.[key]?.defaultVal || this.controls?.[key]?.type == 'toggle')
this.controls?.[key]?.defaultVal ?? this.controls?.[key]?.type == 'toggle')
})
},
save(key, val) { GM_setValue(`${app.configKeyPrefix}_${key}`, val) ; config[key] = val }
Expand Down

0 comments on commit 843d291

Please sign in to comment.