Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid infinite recursion from
window.fetch
name collision
Closes [hotwired#526][] Prevent naming collisions between the new `Turbo.fetch` function and the built-in `window.fetch` function. To do so, create a module-local reference to `window.fetch`, and define the exported function as `fetchWithTurboHeaders`. At export-time, rename to `fetch` so that consumers can continue to import it as `Turbo.fetch`. [hotwired#526]: hotwired/turbo-rails#526
- Loading branch information