Skip to content

Commit

Permalink
fix(app-update): trim text content
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyheart committed Feb 22, 2024
1 parent 0fef0a3 commit 56ca82f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/context/AppUpdate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ export const fetchRelease = async (): Promise<SemVer | undefined> => {
console.debug(logPrefix, `Not found: ${res.status}`)
return undefined
}
const versionString = await res.text()
const v = parse(versionString.slice(0, 20))
const versionString = (await res.text()).trim().slice(0, 20)
const v = parse(versionString)
if (v === null) {
console.error(logPrefix, `Could not parse response as semver!`)
console.debug(logPrefix, versionString.slice(0, 20))
console.debug(logPrefix, versionString)
return undefined
}
return v
Expand Down

0 comments on commit 56ca82f

Please sign in to comment.