Skip to content

Commit

Permalink
fix(js-sdk): Enforcing type of task
Browse files Browse the repository at this point in the history
  • Loading branch information
jzanecook committed Nov 27, 2023
1 parent 1787ee9 commit f0816d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/sdk/js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/sdk/js/src/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,8 @@ const registerCreateArtifact: RouteRegisterFn = (router: Router, context: RouteC
const relativePath = req.body.relative_path

const task = tasks.find(([{ task_id }]) => task_id == taskId)
if (!task) {
res
if (task === undefined) {
return res
.status(404)
.json({ message: 'Unable to find task with the provided id' })
}
Expand Down

0 comments on commit f0816d4

Please sign in to comment.