Skip to content

Commit a0f7528

Browse files
committed
Added check config.preferredAPI set before string comparison in modals.api() ↞ [auto-sync from https://github.com/adamlui/userscripts/tree/master/chatgpt/duckduckgpt]
1 parent 8600b40 commit a0f7528

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

duckduckgpt/greasemonkey/duckduckgpt.user.js

Lines changed: 2 additions & 2 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.8.24
151+
// @version 2025.8.24.1
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
@@ -2082,7 +2082,7 @@
20822082
btnsDiv.querySelectorAll('button').forEach((btn, idx) => {
20832083
if (idx == 0) btn.style.display = 'none' // hide Dismiss button
20842084
else btn.classList.toggle('primary-modal-btn', // emphasize preferred API
2085-
config.preferredAPI.toLowerCase() == btn.textContent.toLowerCase()
2085+
config.preferredAPI && config.preferredAPI.toLowerCase() == btn.textContent.toLowerCase()
20862086
|| btn.textContent == app.msgs.menuLabel_random && !config.preferredAPI)
20872087
})
20882088

0 commit comments

Comments
 (0)