Skip to content

Commit 77b0a64

Browse files
Fix duckAi selection by checking subdomains (#2005)
* Fix duckAi selection by checking subdomains * Lint fix
1 parent 5d1ca50 commit 77b0a64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

injected/src/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ export function withRetry(fn, maxAttempts = 4, delay = 500, strategy = 'exponent
846846
export function isDuckAi() {
847847
const tabUrl = getTabUrl();
848848
const domains = ['duckduckgo.com', 'duck.ai', 'duck.co'];
849-
if (tabUrl?.hostname && domains.includes(tabUrl?.hostname)) {
849+
if (tabUrl?.hostname && domains.some((domain) => matchHostname(tabUrl?.hostname, domain))) {
850850
const url = new URL(tabUrl?.href);
851851
return url.searchParams.has('duckai') || url.searchParams.get('ia') === 'chat';
852852
}

0 commit comments

Comments
 (0)