From fa719a4a60773c5935fd28b856918936791ed484 Mon Sep 17 00:00:00 2001 From: Jonatan Nilsson Date: Sat, 7 Feb 2015 14:37:38 +0000 Subject: [PATCH] request: Send xhrRequest to unwrap method --- mithril.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mithril.js b/mithril.js index 07cd891e..e02b3049 100644 --- a/mithril.js +++ b/mithril.js @@ -989,7 +989,7 @@ var m = (function app(window, undefined) { try { e = e || event; var unwrap = (e.type === "load" ? xhrOptions.unwrapSuccess : xhrOptions.unwrapError) || identity; - var response = unwrap(deserialize(extract(e.target, xhrOptions))); + var response = unwrap(deserialize(extract(e.target, xhrOptions)), e.target); if (e.type === "load") { if (type.call(response) === ARRAY && xhrOptions.type) { for (var i = 0; i < response.length; i++) response[i] = new xhrOptions.type(response[i])