Skip to content

Commit a108b35

Browse files
committed
Always use Turbo.fetch when available, not just in turbo-stream requests
1 parent 83620bb commit a108b35

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/fetch_request.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ export class FetchRequest {
1919
console.error(error)
2020
}
2121

22-
const fetch = (this.responseKind === 'turbo-stream' && window.Turbo)
23-
? window.Turbo.fetch
24-
: window.fetch
25-
22+
const fetch = window.Turbo ? window.Turbo.fetch : window.fetch
2623
const response = new FetchResponse(await fetch(this.url, this.fetchOptions))
2724

2825
if (response.unauthenticated && response.authenticationURL) {

0 commit comments

Comments
 (0)