Skip to content

Commit 28840a7

Browse files
don't log warning if onlyVisible is undefined (#740)
1 parent 3ed7180 commit 28840a7

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

.changeset/bright-beans-smile.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+
dont log deprecation warning when onlyVisible is undefined

lib/StagehandPage.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ ${scriptContent} \
751751
modelClientOptions,
752752
domSettleTimeoutMs,
753753
returnAction = true,
754-
onlyVisible = false,
754+
onlyVisible,
755755
drawOverlay,
756756
} = options;
757757

@@ -783,10 +783,12 @@ ${scriptContent} \
783783
value: llmClient.modelName,
784784
type: "string",
785785
},
786-
onlyVisible: {
787-
value: onlyVisible ? "true" : "false",
788-
type: "boolean",
789-
},
786+
...(onlyVisible !== undefined && {
787+
onlyVisible: {
788+
value: onlyVisible ? "true" : "false",
789+
type: "boolean",
790+
},
791+
}),
790792
},
791793
});
792794

0 commit comments

Comments
 (0)