Skip to content

Commit 2e096a2

Browse files
committed
Fix TypeScript errors and ESLint warnings in checkpoint services
1 parent 0433e09 commit 2e096a2

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/services/checkpoints/MigrationService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export class MigrationService {
8686

8787
// Get commit history
8888
const log = await git.log()
89-
const commits = log.all.reverse() // Oldest first
89+
const commits = [...log.all].reverse() // Oldest first
9090

9191
if (commits.length === 0) {
9292
this.log(`[MigrationService#migrateTask] no commits found for task ${taskId}, skipping`)

src/services/checkpoints/PatchCheckpointService.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,11 @@ export class PatchCheckpointService extends EventEmitter {
301301
from = this.baseSnapshot
302302
}
303303

304+
// Ensure from is defined (TypeScript safety)
305+
if (!from) {
306+
throw new Error("Unable to determine source checkpoint")
307+
}
308+
304309
// Get the source state
305310
const sourceState =
306311
from === this.baseSnapshot ? await this.getBaseSnapshotState() : await this.getCheckpointState(from)

0 commit comments

Comments
 (0)