Commits

Alain Poirier committed 9ace133

No headers received when the connection has failed

Comments (0)

Files changed (1)

 //--
-// Copyright (c) 2008-2013, Net-ng.
+// Copyright (c) 2008-2012, Net-ng.
 // All rights reserved.
 //
 // This software is licensed under the BSD License, as described in
 
     success : function (o) { setTimeout(o.responseText, 0); },
     failure : function (o) {
-                            var url = o.getResponseHeader["X-Debug-URL"];
+                            var url = o.status ? o.getResponseHeader["X-Debug-URL"] : undefined;
                             if(url) {
                                         window.location = url;
                                     } else {
 var nagare_loaded_named_js = {};
 
 function nagare_filter(items, filter) {
-    var not_in_filter = new Array();
+    var not_in_filter = [];
 
     for(var i=0; i<items.length; i++)
         if(!filter[items[i][0]])
 
 
 function nagare_itemgetter(l, x) {
-    var r = new Array();
+    var r = [];
     for(var i=0; i<l.length; i++) r[r.length] = l[i][x];
     return r;
 }