Skip to content

Commit 6f0ec84

Browse files
committed
Update gitCheckout method to make options parameter optional
1 parent 472d5ae commit 6f0ec84

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/sandbox/src/sandbox.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1868,12 +1868,12 @@ export class Sandbox<Env = unknown> extends Container<Env> implements ISandbox {
18681868

18691869
async gitCheckout(
18701870
repoUrl: string,
1871-
options: { branch?: string; targetDir?: string; sessionId?: string }
1871+
options?: { branch?: string; targetDir?: string; sessionId?: string }
18721872
) {
1873-
const session = options.sessionId ?? (await this.ensureDefaultSession());
1873+
const session = options?.sessionId ?? (await this.ensureDefaultSession());
18741874
return this.client.git.checkout(repoUrl, session, {
1875-
branch: options.branch,
1876-
targetDir: options.targetDir
1875+
branch: options?.branch,
1876+
targetDir: options?.targetDir
18771877
});
18781878
}
18791879

0 commit comments

Comments
 (0)