]> git.wh0rd.org Git - tt-rss.git/commitdiff
getFeedName: return empty string instead of null when element is not found
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sun, 14 Nov 2010 15:22:06 +0000 (18:22 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sun, 14 Nov 2010 15:22:06 +0000 (18:22 +0300)
feedlist.js

index 54298e9528e1b0668cc57450c2cf2e08f753fb23..3df1bd80d3a3c2bab19ceda25bfe92241c0d03bf 100644 (file)
@@ -874,13 +874,15 @@ function resort_category(node, cat_mode) {
                var by_unread = feedsSortByUnread();
        
                var list = node.getElementsByTagName("LI");
-       
+
                for (i = 0; i < list.length; i++) {
        
                        for (j = i+1; j < list.length; j++) {                   
        
                                var tmp_val = get_feed_entry_unread(list[i]);
                                var cur_val = get_feed_entry_unread(list[j]);
+                               
+                               //console.log(list[i].id + " vs " + list[j].id);
        
                                var tmp_name = get_feed_entry_name(list[i]).toLowerCase();
                                var cur_name = get_feed_entry_name(list[j]).toLowerCase();
@@ -999,7 +1001,7 @@ function getFeedName(id, is_cat) {
        if (e) {
                return e.innerHTML.stripTags();
        } else {
-               return null;
+               return '';
        }
 }