Skip to content

Commit e180590

Browse files
Fix jquery override
1 parent 31fb83b commit e180590

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

app/javascript/oldjs/jquery_overrides.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,15 @@ $.ajaxSetup({
4545
jQuery.globalEval(text.slice('throw "error";'.length));
4646
return text;
4747
}),
48+
'text script': logError(function(text) {
49+
console.log(text);
50+
if (text.match(/^{/)) {
51+
return jQuery.jsonPayload(text, function(text) {
52+
return text;
53+
});
54+
} // JavaScript payload
55+
jQuery.globalEval(text.slice('throw "error";'.length));
56+
return text;
57+
}),
4858
},
4959
});

0 commit comments

Comments
 (0)