fix: use patch 0 as fallback when no previous installation

0 means no local installation on launcher

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
devilreef 2026-01-16 01:40:43 +06:00
parent 96eb5f754d
commit f55868dd00

View file

@ -81,10 +81,9 @@ export async function checkPatchesUpdate(
// Update detected
state[patchline] = { lastVersion: currentVersion, lastPatchId: patchId, lastCheck: new Date().toISOString() }
// Fetch patch size
const patchSize = lastState?.lastPatchId !== undefined
? await getPatchSize(patchline, lastState.lastPatchId, patchId)
: undefined
// Fetch patch size (0 means no local installation)
const fromPatch = lastState?.lastPatchId ?? 0
const patchSize = await getPatchSize(patchline, fromPatch, patchId)
updates.push({
patchline,