Skip to content

Commit abf9ba5

Browse files
authored
ajax update ignored if ajax response is an object
In asyncOnSuccess it checks whether ajax response is converted to an object. If so it ignores the ajax update codes
1 parent 8724336 commit abf9ba5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jquery.unobtrusive-ajax.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
function asyncOnSuccess(element, data, contentType) {
4848
var mode;
4949

50-
if (contentType.indexOf("application/x-javascript") !== -1) { // jQuery already executes JavaScript for us
50+
if (contentType.indexOf("application/x-javascript") !== -1 || $.isPlainObject(data)){ // jQuery already executes JavaScript for us
5151
return;
5252
}
5353

0 commit comments

Comments
 (0)