Skip to content

Commit 748c4b7

Browse files
committed
Added www. exception for common tabs
1 parent d5bb8c7 commit 748c4b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/services/browser/BrowserSession.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,8 @@ export class BrowserSession {
308308
private getRootDomain(url: string): string {
309309
try {
310310
const urlObj = new URL(url)
311-
return urlObj.host // Returns hostname with port if present
311+
// Remove www. prefix if present
312+
return urlObj.host.replace(/^www\./, "")
312313
} catch (error) {
313314
// If URL parsing fails, return the original URL
314315
return url

0 commit comments

Comments
 (0)