From: Manuel Penschuck Date: Mon, 16 Feb 2015 14:45:27 +0000 (+0100) Subject: Proper treatment of empty response string X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=6deb5d88a2eb6a96cd05c99c10646eb720cfd7f6;p=daqtools.git Proper treatment of empty response string --- diff --git a/web/htdocs/scripts/cts.js b/web/htdocs/scripts/cts.js index 462ba07..3f000a8 100644 --- a/web/htdocs/scripts/cts.js +++ b/web/htdocs/scripts/cts.js @@ -806,7 +806,8 @@ function timestamp2Date(ts) { function requestFailure(obj){ - var text = (obj.responseText) ? obj.responseText : obj; + console.debug(obj); + var text = String((typeof(obj) == 'string') ? obj : obj.responseText); var m = text.match(/
([\s\S]*)<\/pre>/im);