X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/3193141f55df20910cf8ba35f9e669d79c90d3f4..e024b596f2a1b5346fd22837aec0116c05f17ed9:/platforma/static/js/app.js?ds=sidebyside
diff --git a/platforma/static/js/app.js b/platforma/static/js/app.js
index e8b439df..8dae56e4 100644
--- a/platforma/static/js/app.js
+++ b/platforma/static/js/app.js
@@ -188,13 +188,16 @@ function parseXHRError(response)
var json = $.evalJSON(response.responseText);
if(json.reason == 'xml-parse-error') {
- message = json_response.message.replace(/(line\s+)(\d+)(\s+)/i,
+ message = json.message.replace(/(line\s+)(\d+)(\s+)/i,
"$1$2$3");
message = message.replace(/(line\s+)(\d+)(\,\s*column\s+)(\d+)/i,
"$1$2$3$4");
}
- message = json_response.message || json_response.reason || "Nieznany bÅÄ
d :((";
+ else {
+ message = json.message || json.reason || "Nieznany bÅÄ
d :((";
+ }
+
} catch(e) {
// not a valid JSON response
message = response.statusText;