core: prevent crash when starting in repositories without any commits yet

This commit is contained in:
Dax Raad
2025-11-11 15:11:26 -05:00
parent 98be75b17c
commit 85f15893bc

View File

@@ -60,7 +60,7 @@ export namespace Project {
.toSorted(),
)
id = roots[0]
Bun.file(path.join(git, "opencode")).write(id)
if (id) Bun.file(path.join(git, "opencode")).write(id)
}
timer.stop()
if (!id) {