Remove workaround for lack of responseType='json'. #904

This commit is contained in:
ccd0 2016-05-17 02:41:49 -07:00
parent 17dfb391d7
commit b7bfa04dbd

View File

@ -76,12 +76,6 @@ $.ajax = do ->
if /\.json$/.test url
options.responseType ?= 'json'
$.extend r, options
# XXX https://code.google.com/p/chromium/issues/detail?id=119256 (Maxthon is still on Chromium 30)
if options.responseType is 'json' and r.responseType isnt 'json' and delete r.response
Object.defineProperty r, 'response',
configurable: true
enumerable: true
get: -> return JSON.parse r.responseText
$.extend r.upload, upCallbacks
r.send form
r