]> git.wh0rd.org Git - tt-rss.git/commitdiff
Show a blank icon in PrefFeedTree if there is no favicon for a feed.
authorwn_ <invalid@email.com>
Sat, 27 May 2017 17:25:59 +0000 (12:25 -0500)
committerwn_ <invalid@email.com>
Sat, 27 May 2017 17:29:00 +0000 (12:29 -0500)
Duplicates behavior of FeedTree.
Prevents a broken request to 'false' if a feed doesn't have a favicon.

js/PrefFeedTree.js

index 3cf8257bee216f6c03f437759873962a0bd05d0e..0079f0b1b0e8cb8c43e7582c3f22f091e4d0d40c 100644 (file)
@@ -23,12 +23,14 @@ require(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functi
                _createTreeNode: function(args) {
                        var tnode = this.inherited(arguments);
 
-                       if (args.item.icon) {
-                               var icon = dojo.doc.createElement('img');
+                       var icon = dojo.doc.createElement('img');
+                       if (args.item.icon && args.item.icon[0]) {
                                icon.src = args.item.icon[0];
-                               icon.className = 'tinyFeedIcon';
-                               domConstruct.place(icon, tnode.iconNode, 'only');
+                       } else {
+                               icon.src = 'images/blank_icon.gif';
                        }
+                       icon.className = 'tinyFeedIcon';
+                       domConstruct.place(icon, tnode.iconNode, 'only');
 
                        var param = this.model.store.getValue(args.item, 'param');