Skip to content

Commit

Permalink
fix tryit usage of toResult
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson committed Jul 23, 2024
1 parent 5a4e331 commit 8435974
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/async/tryit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function tryit<TArgs extends any[], TReturn, TError = Error>(
} catch (err) {
return [err, undefined] as ToResult<TReturn, TError>
}
return toResult(result)
return toResult(null, result)
}
}

Expand Down

0 comments on commit 8435974

Please sign in to comment.