Fix server-generated JS response processing on IE9 when using rails-ujs and remote: true

This commit is contained in:
Josh Goodall 2017-05-16 20:21:18 +10:00
parent 0714251b2d
commit 4be50a4a45

@ -14,7 +14,7 @@ AcceptHeaders =
Rails.ajax = (options) ->
options = prepareOptions(options)
xhr = createXHR options, ->
response = processResponse(xhr.response, xhr.getResponseHeader('Content-Type'))
response = processResponse(xhr.response ? xhr.responseText, xhr.getResponseHeader('Content-Type'))
if xhr.status // 100 == 2
options.success?(response, xhr.statusText, xhr)
else