Skip to content

Commit

Permalink
Apply feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Murderlon committed Apr 29, 2024
1 parent 8e21356 commit e67f598
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@uppy/xhr-upload/src/index.ts
Expand Up @@ -208,9 +208,9 @@ export default class XHRUpload<
},
})

const body = JSON.parse(res.responseText)
const body = JSON.parse(res.responseText) as B

if (!body?.url) {
if (typeof body?.url !== 'string') {
throw new Error(
'Expected body to be JSON and have a `url` property.',
)
Expand Down

0 comments on commit e67f598

Please sign in to comment.