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

core/field_dropdown : always return something. #14

Closed
wants to merge 10 commits into from

Conversation

LilyMakesThings
Copy link

Resolves

This common error when a menu receives a completely empty array.
image

Proposed Changes

Have getOptions always return an array with at least a blank string.

Reason for Changes

This error is commonly found among following steps in the TurboWarp extension documentation. Especially for people working with the much less documented dynamic menus, you wouldn't expect such a common case to be the cause of this.

It's not entirely obvious or logical that this would be caused by an empty menu, especially when it should be handled internally.

Test Coverage

None.

@LilyMakesThings LilyMakesThings changed the title cor/field_dropdown : always return something. core/field_dropdown : always return something. Feb 9, 2024
core/field_dropdown.js Outdated Show resolved Hide resolved
Don't know which method is the most tasteful in this case so I just went with the one I already knew
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