Fix TypeScript error in version check

This commit is contained in:
Mario Zechner
2025-11-20 12:00:51 +01:00
Unverified
parent 44b0f43eeb
commit d8fb065f1b
2 changed files with 78 additions and 61 deletions
+1 -1
View File
@@ -314,7 +314,7 @@ async function checkForNewVersion(currentVersion: string): Promise<string | null
const response = await fetch("https://registry.npmjs.org/@mariozechner/pi-coding-agent/latest");
if (!response.ok) return null;
const data = await response.json();
const data = (await response.json()) as { version?: string };
const latestVersion = data.version;
if (latestVersion && latestVersion !== currentVersion) {