Skip to content
Snippets Groups Projects
Commit dcec5383 authored by john's avatar john
Browse files

catch errors in ink promise

parent 05a3720d
No related branches found
No related tags found
No related merge requests found
...@@ -21,11 +21,13 @@ export class UploadButton extends React.Component { ...@@ -21,11 +21,13 @@ export class UploadButton extends React.Component {
toggleUpload() toggleUpload()
convertFile(file).then(response => { convertFile(file).then(response => {
// console.log(response) // console.log('response', response)
// console.log(chapter)
chapter.source = response.converted chapter.source = response.converted
update(chapter) update(chapter)
toggleUpload() toggleUpload()
}).catch((e) => {
// console.log('error', e)
toggleUpload()
}) })
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment