Skip to content

Commit 64d331d

Browse files
authored
fix new tab intercept for invalid urls (#772)
1 parent d312a43 commit 64d331d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/fuzzy-jobs-switch.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@browserbasehq/stagehand-lib": patch
3+
---
4+
5+
Fixes an issue with the new tab intercepts for invalid urls

lib/handlers/handlerUtils/actHandlerUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ async function handlePossiblePageNavigation(
441441
},
442442
});
443443

444-
if (newOpenedTab) {
444+
if (newOpenedTab && newOpenedTab.url() !== "about:blank") {
445445
logger({
446446
category: "action",
447447
message: "new page detected (new tab) with URL",

0 commit comments

Comments
 (0)