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

[TS/JS] Use minvalue from enum if not found #7888

Merged
merged 2 commits into from
Apr 6, 2023

Conversation

bjornharrtell
Copy link
Collaborator

Fix for #7885.

I'm not sure about the logic here though so would be good with a santity check review.

@github-actions github-actions bot added c++ codegen Involving generating code from schema javascript typescript labels Apr 1, 2023
@bjornharrtell bjornharrtell changed the title TS/JS: Use minvalue from enum if not found [TS/JS] Use minvalue from enum if not found Apr 1, 2023
@le-michael
Copy link
Collaborator

Instead of defaulting to the first value. Would it be safer to just make these fields nullable?

@bjornharrtell
Copy link
Collaborator Author

Instead of defaulting to the first value. Would it be safer to just make these fields nullable?

Yes, perhaps? But my interest in the object API is low so I suggesr this minimal fix for now.

@dbaileychess dbaileychess enabled auto-merge (squash) April 6, 2023 01:22
@dbaileychess dbaileychess merged commit 0888e7c into google:master Apr 6, 2023
@bjornharrtell bjornharrtell deleted the issue-7885 branch April 6, 2023 07:06
jochenparm pushed a commit to jochenparm/flatbuffers that referenced this pull request Oct 29, 2024
Co-authored-by: Derek Bailey <derekbailey@google.com>
jochenparm pushed a commit to jochenparm/flatbuffers that referenced this pull request Oct 29, 2024
Co-authored-by: Derek Bailey <derekbailey@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ codegen Involving generating code from schema javascript typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants