Perf: remove talkingdata

This commit is contained in:
萌萌哒赫萝
2023-05-18 18:23:56 +08:00
parent 50d8d721ca
commit d9d2a840c4
9 changed files with 5 additions and 95 deletions

View File

@@ -41,9 +41,7 @@ export const simpleClone = (obj: any) => {
return JSON.parse(JSON.stringify(obj))
}
export const enforceNumber = (num: number | string) => {
return isNaN(+num) ? 0 : +num
}
export const enforceNumber = (num: number | string) => isNaN(+num) ? 0 : +num
export const isDev = process.env.NODE_ENV === 'development'

View File

@@ -4,11 +4,8 @@ import { RELEASE_URL, RELEASE_URL_BACKUP } from './static'
export const getLatestVersion = async (): Promise<string> => {
try {
const { data } = await axios.get(RELEASE_URL)
const releases = data as IStringKeyMap[]
const normalList = releases.filter(item => !item.name.includes('beta'))
const latestRelease = normalList[0]
return latestRelease.name
const { data: normalList } = await axios.get(RELEASE_URL)
return normalList[0].name
} catch (err) {
console.log(err)
try {