Skip to content

Commit

Permalink
update async demo
Browse files Browse the repository at this point in the history
  • Loading branch information
doodlewind committed Jan 10, 2018
1 parent 188ebf2 commit 8ff167d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/walkthrough.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ Say you're transforming data of a legacy rich content editor, whose XML string h
async function imageOps (node, resolve, reject) {
const image = await fetch(node.src)
const newSrc = await uploadImage(image)
resolve({
node: { ...node, src: newSrc }
})
try {
resolve({ node: { ...node, src: newSrc } })
} catch (e) { reject(e) }
}

const rules = [
Expand Down

0 comments on commit 8ff167d

Please sign in to comment.