]> git.wh0rd.org Git - tt-rss.git/commitdiff
infobox_callback2: fail on invalid dialog xml
authorAndrew Dolgov <fox@fakecake.org>
Sat, 20 Nov 2010 12:38:27 +0000 (15:38 +0300)
committerAndrew Dolgov <fox@fakecake.org>
Sat, 20 Nov 2010 12:38:27 +0000 (15:38 +0300)
functions.js

index e303c40491352ac2ab7e3fe8d44a20031c42906e..4f1f37553f497d04661035f7d75768169443c556 100644 (file)
@@ -466,20 +466,15 @@ function infobox_callback2(transport) {
                var content;
                var dtitle = "Dialog";
 
-               if (transport.responseXML) {
-                       var dlg = transport.responseXML.getElementsByTagName("dlg")[0];
-
-                       var title = transport.responseXML.getElementsByTagName("title")[0];
-                       if (title)
-                               title = title.firstChild.nodeValue;
+               var dlg = transport.responseXML.getElementsByTagName("dlg")[0];
 
-                       var content = transport.responseXML.getElementsByTagName("content")[0];
-                       
-                       content = content.firstChild.nodeValue;
+               var title = transport.responseXML.getElementsByTagName("title")[0];
+               if (title)
+                       title = title.firstChild.nodeValue;
 
-               } else {
-                       content = transport.responseText;
-               }
+               var content = transport.responseXML.getElementsByTagName("content")[0];
+               
+               content = content.firstChild.nodeValue;
 
                if (!dialog) {
                        dialog = new dijit.Dialog({