forked from hotwired/turbo-rails
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Type Safety Guards to
turbo/fetch_requests
Through the exercise of attempting to [port the `turbo/fetch_requests` module to TypeScript](hotwired#392 (comment)), we've identified some potential edge cases in the algorithm that determines a request's HTTP method. Even if the migration to TypeScript doesn't come to fruition for some time, those edge cases should be addressed sooner rather than later. This commit adds more "type safety" motivated conditionals and guards to make sure that values are present before overriding them.
- Loading branch information
1 parent
2a80b2c
commit c804ecd
Showing
4 changed files
with
69 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.