From bd0ce5c06bd2488b73fc3dfd744a19cd6430a272 Mon Sep 17 00:00:00 2001 From: Julien Bisconti Date: Tue, 1 Dec 2015 18:04:11 +0100 Subject: [PATCH] Overriding extract option in m.request fixes: #859 --- mithril.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mithril.js b/mithril.js index 9a70070c..cec9a331 100644 --- a/mithril.js +++ b/mithril.js @@ -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