Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update use of nullish coalescing in agent.ts #90

Closed
wants to merge 1 commit into from

Conversation

vinuch
Copy link

@vinuch vinuch commented Dec 23, 2023

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:

  • My code adheres to the project's coding standards and style guidelines.

  • 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.

  • 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

Copy link

vercel bot commented Dec 23, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
agentprotocolai ⬜️ Ignored (Inspect) Visit Preview Dec 23, 2023 7:59am

@hackgoofer
Copy link
Contributor

hackgoofer commented Jan 9, 2024

Hi, favoring a similar PR: #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

@hackgoofer hackgoofer closed this Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants