Commit fa4735f3 authored by Tristan Cavelier's avatar Tristan Cavelier

Error responseText parse improved

parent ff853ddf
......@@ -111,12 +111,11 @@
}
} else if (typeof answer.target.responseText === "string") {
dom = new DOMParser().parseFromString(
"<stubelementjusttocreateafirstelementchildattributetodom>" +
answer.target.responseText +
"</stubelementjusttocreateafirstelementchildattributetodom>",
"text/xml"
answer.target.responseText,
"text/html"
);
result.message = dom.firstElementChild.textContent;
result.message = (dom.querySelector('#master') ||
dom.firstElementChild).textContent;
if (!result.message) { delete result.message; }
}
throw result;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment