Merge pull request #447 from TheThing/next
m.request: Add XMLHttpRequest parameter to the unwrap method
This commit is contained in:
commit
d446272cf3
1 changed files with 1 additions and 1 deletions
|
|
@ -989,7 +989,7 @@ var m = (function app(window, undefined) {
|
||||||
try {
|
try {
|
||||||
e = e || event;
|
e = e || event;
|
||||||
var unwrap = (e.type === "load" ? xhrOptions.unwrapSuccess : xhrOptions.unwrapError) || identity;
|
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 (e.type === "load") {
|
||||||
if (type.call(response) === ARRAY && xhrOptions.type) {
|
if (type.call(response) === ARRAY && xhrOptions.type) {
|
||||||
for (var i = 0; i < response.length; i++) response[i] = new xhrOptions.type(response[i])
|
for (var i = 0; i < response.length; i++) response[i] = new xhrOptions.type(response[i])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue