Skip to content

Commit

Permalink
fix isAsyncIterable type-guard example (ardatan#1415)
Browse files Browse the repository at this point in the history
  • Loading branch information
nlepage authored Jun 12, 2022
1 parent 0f0f001 commit 56a19d5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions website/docs/plugins/lifecycle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,8 @@ const myPlugin = (): Plugin => {
onExecute({ args }) {
return {
onExecuteDone: ({ result, setResult }) => {
if (isAsyncIterable(result)) {
// Here you can access result, and modify it with setResult if needed
}
if (!isAsyncIterable(result)) return
// Here you can access result, and modify it with setResult if needed
},
};
},
Expand Down

0 comments on commit 56a19d5

Please sign in to comment.