]> git.wh0rd.org Git - tt-rss.git/commitdiff
FeedTree: add some additional checks in get/setFeedValue
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 19 Nov 2010 12:38:24 +0000 (15:38 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 19 Nov 2010 12:38:24 +0000 (15:38 +0300)
FeedTree.js

index d0da80c81a8080dc5b99554956876b305987a719..771dc15f662f668d2e8c7d79a5352bc116e03f8b 100644 (file)
@@ -8,6 +8,8 @@ dojo.declare("fox.FeedStoreModel", dijit.tree.ForestStoreModel, {
                return this.store._itemsByIdentity[id];
        },
        getFeedValue: function(feed, is_cat, key) {     
+               if (!this.store._itemsByIdentity) return undefined;
+
                if (is_cat) 
                        treeItem = this.store._itemsByIdentity['CAT:' + feed];
                else
@@ -28,6 +30,7 @@ dojo.declare("fox.FeedStoreModel", dijit.tree.ForestStoreModel, {
        },
        setFeedValue: function(feed, is_cat, key, value) {
                if (!value) value = '';
+               if (!this.store._itemsByIdentity) return undefined;
 
                if (is_cat) 
                        treeItem = this.store._itemsByIdentity['CAT:' + feed];