Closed vinuch closed 10 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Hi, favoring a similar PR: https://github.com/AI-Engineer-Foundation/agent-protocol/pull/88 because it also introduces cleanup for the build/publish flow.
Thank you for submitting your first PR. Hoping to see more of your work! <3
Pull Request
Description
Issue: This pull request contains a fix for JS SDK - Bug: build error for more details reference this issue #87
Reason: The issue in the code was related to the misuse of the nullish coalescing operator (??). The nullish coalescing operator is designed to provide a default value only when the left operand is null or undefined. In this case, the code task.artifacts != null ?? [] inadvertently used the nullish coalescing operator with a non-null value (task.artifacts != null), leading to a boolean result (true or false) instead of an array.
Changes: updated the code to use the nullish coalescing operator (??) correctly, providing a default value of an empty array when task.artifacts is null or undefined
Checklist
Please review and check the following items to ensure your pull request can be processed smoothly:
[x] My code adheres to the project's coding standards and style guidelines.
[x] I have tested my changes thoroughly, including unit tests where applicable.
[ ] I have updated the documentation to reflect any changes made in this pull request.
[x] My branch is up-to-date with the latest changes from the main branch.
[ ] I have received code review feedback and addressed any comments or concerns.
References, Fixes and Closes