From: Andrew Dolgov Date: Fri, 19 Nov 2010 12:38:24 +0000 (+0300) Subject: FeedTree: add some additional checks in get/setFeedValue X-Git-Tag: 1.5.0~141 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=b8aa9ca7f083a5c62084e2752168f9ecc6170e46;p=tt-rss.git FeedTree: add some additional checks in get/setFeedValue --- diff --git a/FeedTree.js b/FeedTree.js index d0da80c8..771dc15f 100644 --- a/FeedTree.js +++ b/FeedTree.js @@ -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];