fix: Don't treat newt release-candidate as a "update" in the site list

This commit is contained in:
Jacky Fong
2025-12-22 21:58:13 +08:00
committed by Owen Schwartz
parent 7e48cbe1aa
commit 27440700a5

View File

@@ -39,12 +39,12 @@ async function getLatestNewtVersion(): Promise<string | null> {
return null;
}
const tags = await response.json();
let tags = await response.json();
if (!Array.isArray(tags) || tags.length === 0) {
logger.warn("No tags found for Newt repository");
return null;
}
tags = tags.filter((version) => !version.name.includes("rc"));
const latestVersion = tags[0].name;
cache.set("latestNewtVersion", latestVersion);