Skip to content

Commit fc3885c

Browse files
authored
Merge pull request #1 from cmcgit/cmcgit-patch-ajax-update-ignored
ajax update ignored if ajax response is an object
2 parents 8724336 + abf9ba5 commit fc3885c

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)