From b71a7df9edd13af85733f89d854e7d834fa0a468 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 14 Nov 2010 18:22:06 +0300 Subject: [PATCH] getFeedName: return empty string instead of null when element is not found --- feedlist.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/feedlist.js b/feedlist.js index 54298e95..3df1bd80 100644 --- a/feedlist.js +++ b/feedlist.js @@ -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 ''; } } -- 2.39.5