Skip to content

Commit 451f446

Browse files
committed
simplify
1 parent 21c6578 commit 451f446

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

browserbase/src/sessionManager.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,15 @@ export async function createNewBrowserSession(
9292
projectId: config.browserbaseProjectId!,
9393
proxies: config.proxies,
9494
browserSettings: {
95-
...(config.viewPort ? { viewport: {
96-
width: config.viewPort?.browserWidth,
97-
height: config.viewPort?.browserHeight,
98-
}} : {}),
99-
...(config.context?.contextId ? { context: {
100-
id: config.context?.contextId,
101-
persist: config.context?.persist ?? true, // Default to true if not specified
102-
}} : {})
103-
},
95+
viewport: {
96+
width: config.viewPort?.browserWidth ?? 1024,
97+
height: config.viewPort?.browserHeight ?? 768,
98+
},
99+
context: {
100+
id: config.context?.contextId ?? "",
101+
persist: config.context?.persist ?? true,
102+
}
103+
}
104104
};
105105

106106
try {

0 commit comments

Comments
 (0)