Skip to content

Commit

Permalink
Bump version for 0.0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelolx committed Nov 17, 2023
1 parent 4d1d6f9 commit 500f78a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ GEM
nokogiri (>= 1.5.9)
method_source (1.0.0)
minitest (5.14.4)
nokogiri (1.12.3-arm64-darwin)
racc (~> 1.4)
nokogiri (1.12.3-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.12.3-x86_64-linux)
Expand All @@ -63,6 +65,7 @@ GEM
zeitwerk (2.4.2)

PLATFORMS
arm64-darwin-21
x86_64-darwin-18
x86_64-linux

Expand Down
8 changes: 6 additions & 2 deletions app/assets/javascripts/requestjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ class FetchRequest {
if (response.unauthenticated && response.authenticationURL) {
return Promise.reject(window.location.href = response.authenticationURL);
}
if (response.ok && response.isTurboStream) {
const responseStatusIsTurboStreamable = response.ok || response.unprocessableEntity;
if (responseStatusIsTurboStreamable && response.isTurboStream) {
await response.renderTurboStream();
}
return response;
Expand All @@ -159,7 +160,7 @@ class FetchRequest {
headers: this.headers,
body: this.formattedBody,
signal: this.signal,
credentials: "same-origin",
credentials: this.credentials,
redirect: this.redirect
};
}
Expand Down Expand Up @@ -232,6 +233,9 @@ class FetchRequest {
get redirect() {
return this.options.redirect || "follow";
}
get credentials() {
return this.options.credentials || "same-origin";
}
get additionalHeaders() {
return this.options.headers || {};
}
Expand Down

0 comments on commit 500f78a

Please sign in to comment.