Overriding extract option in m.request

fixes: #859
This commit is contained in:
Julien Bisconti 2015-12-01 18:04:11 +01:00
parent edc5dca238
commit bd0ce5c06b

View file

@ -2087,7 +2087,7 @@ void (function (global, factory) { // eslint-disable-line
if (!options.dataType || options.dataType.toLowerCase() !== "jsonp") {
serialize = options.serialize || JSON.stringify
deserialize = options.deserialize || JSON.parse
extract = function (xhr) {
extract = options.extract || function (xhr) {
if (xhr.responseText.length === 0 &&
deserialize === JSON.parse) {
return null