Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent "installation" of nonexistent builds
It's possible to click "Install" when there are no builds to choose from, resulting in a (seemingly common) error[0]. There are a few interlinked issues at play here. One is that we don't have strict null checks on, that Underscore's type signatures don't acknowledge `undefined` as a possible return value, and that a game is considered installable if there are no errors, and we're not calling the API. What it doesn't consider is the possibility that the API tells us that there's nothing available. I've resolved this at the earliest point in the user experience, by redefining "installability" to include the presence of an installable build. The other issues regarding nullability are still present, but aren't practically a concern from what I've been able to reproduce. [0]https://itch.io/t/1112356/cannot-read-property-build-of-undefined-error-when-trying-to-install-games
- Loading branch information