Skip to content

Commit 0af599e

Browse files
thiagoyoussefmarcelolx
authored andcommitted
Use Turbo.fetch to prevent page refreshes bounces
1 parent f3f0a04 commit 0af599e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/assets/javascripts/requestjs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ class FetchRequest {
148148
} catch (error) {
149149
console.error(error);
150150
}
151-
const fetch = this.responseKind === "turbo-stream" && window.Turbo ? window.Turbo.fetch : window.fetch;
151+
const fetch = window.Turbo ? window.Turbo.fetch : window.fetch;
152152
const response = new FetchResponse(await fetch(this.url, this.fetchOptions));
153153
if (response.unauthenticated && response.authenticationURL) {
154154
return Promise.reject(window.location.href = response.authenticationURL);

0 commit comments

Comments
 (0)