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

Avoid infinite recursion from window.fetch name collision #1077

Merged
merged 1 commit into from
Nov 27, 2023

Commits on Nov 27, 2023

  1. 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
    seanpdoyle committed Nov 27, 2023
    Configuration menu
    Copy the full SHA
    9a4c994 View commit details
    Browse the repository at this point in the history