Skip to content

Commit 2a2a10e

Browse files
committed
Revert "Merge pull request #9427 from jrafanie/document-why-we-have-two-script-converters"
This reverts commit da9e6e0, reversing changes made to 46325d7.
1 parent 8e13145 commit 2a2a10e

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

app/javascript/oldjs/jquery_overrides.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,6 @@ jQuery.jsonPayload = function(text, fallback) {
2424
};
2525

2626
$.ajaxSetup({
27-
/* Define two script converters:
28-
29-
1) script - This is the original converter to evaluate scripts for successful responses.
30-
2) miq_script - Define a duplicate but differently named script converter whose purpose is to
31-
evaluate scripts for unsuccessful ajax responses. jQuery 3.5.0 changed the behavior of the script
32-
converter, replacing it with a no-op converter for scripts found in unsuccessful ajax responses.
33-
Successful responses would continue to be evaluated as previously.
34-
See: https://github.com/jquery/jquery/commit/da3dd85b63c4e3a6a768132c2a83a1a6eec24840
35-
36-
Due to this change starting in 3.5.0, we define a new type of script we can set as the dataType
37-
so it's evaluated in the event of unsuccessful responses such as the SSO 401 unauthorized
38-
issue we attempted to fix in #9410 and subsequently completed in #9426.
39-
*/
4027
accepts: {
4128
json: 'text/javascript, application/javascript, application/ecmascript, application/x-ecmascript',
4229
},

0 commit comments

Comments
 (0)