Skip to content

Commit 08ecda0

Browse files
authored
Merge pull request #1 from djb4ai/djb4ai-patch-1
Add `await stagehand.init();` before taking the action
2 parents 84e8515 + a425ec5 commit 08ecda0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

stagehand/src/server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ export async function ensureStagehand() {
9292

9393
// Try to perform a simple operation to check if the session is still valid
9494
try {
95+
await stagehand.init();
9596
await stagehand.page.evaluate(() => document.title);
9697
return stagehand;
9798
} catch (error) {

0 commit comments

Comments
 (0)