From 6deb5d88a2eb6a96cd05c99c10646eb720cfd7f6 Mon Sep 17 00:00:00 2001 From: Manuel Penschuck Date: Mon, 16 Feb 2015 15:45:27 +0100 Subject: [PATCH] Proper treatment of empty response string --- web/htdocs/scripts/cts.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);
    
    
-- 
2.43.0