Commit fa4735f3 authored by Tristan Cavelier's avatar Tristan Cavelier

Error responseText parse improved

parent ff853ddf
...@@ -111,12 +111,11 @@ ...@@ -111,12 +111,11 @@
} }
} else if (typeof answer.target.responseText === "string") { } else if (typeof answer.target.responseText === "string") {
dom = new DOMParser().parseFromString( dom = new DOMParser().parseFromString(
"<stubelementjusttocreateafirstelementchildattributetodom>" + answer.target.responseText,
answer.target.responseText + "text/html"
"</stubelementjusttocreateafirstelementchildattributetodom>",
"text/xml"
); );
result.message = dom.firstElementChild.textContent; result.message = (dom.querySelector('#master') ||
dom.firstElementChild).textContent;
if (!result.message) { delete result.message; } if (!result.message) { delete result.message; }
} }
throw result; 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