🐛 Fix(custom): fix the double v in version page

This commit is contained in:
Kuingsmile
2026-01-05 13:36:18 +08:00
parent 4d074e8ed2
commit 5460bd785a
16 changed files with 118 additions and 511 deletions

View File

@@ -7,6 +7,8 @@ export const getLatestVersion = async (): Promise<string> => {
throw new Error(`HTTP error! status: ${response.status}`)
}
const normalList = await response.json()
console.log('Fetched latest version info: ', normalList)
console.log('Latest version is: ', normalList[0].name)
return normalList[0].name
} catch (err) {
console.error('Error fetching latest version: ', err)
@@ -16,7 +18,7 @@ export const getLatestVersion = async (): Promise<string> => {
throw new Error(`HTTP error! status: ${response.status}`)
}
const data = await response.text()
const r = window.node.yaml.load(data) as IStringKeyMap
const r = window.node.yaml.parse(data).toJSON() as IStringKeyMap
return r.version
} catch (err) {
console.error('Error fetching backup latest version: ', err)