mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-24 17:50:24 +08:00
🐛 Fix(custom): fix the double v in version page
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user