]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
Proper treatment of empty response string
authorManuel Penschuck <manuel.penschuck@stud.uni-frankfurt.de>
Mon, 16 Feb 2015 14:45:27 +0000 (15:45 +0100)
committerManuel Penschuck <manuel.penschuck@stud.uni-frankfurt.de>
Mon, 16 Feb 2015 14:45:27 +0000 (15:45 +0100)
web/htdocs/scripts/cts.js

index 462ba073c446f6391a86edd2a8a50349605f7006..3f000a86c8af581aab628274510fb3044e99deff 100644 (file)
@@ -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(/<pre>([\s\S]*)<\/pre>/im);