Merge pull request #143 from LLOneBot/fix-update

Fix: update
This commit is contained in:
linyuchen 2024-03-20 12:24:17 +08:00 committed by GitHub
commit 7966bf75c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,9 +12,9 @@ export async function checkVersion() {
const latestVersionText = await getRemoteVersion();
const latestVersion = latestVersionText.split(".");
log("llonebot last version", latestVersion);
const currentVersion = version.split(".");
for (let k in [0, 1, 2]) {
if (latestVersion[k] > currentVersion[k]) {
const currentVersion: string[] = version.split(".");
for (let k of [0, 1, 2]) {
if (parseInt(latestVersion[k]) > parseInt(currentVersion[k])) {
return { result: false, version: latestVersionText };
}
}