mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-17 16:01:29 +00:00
updateCurrentUnread: don't crash if counter element is not available
This commit is contained in:
@@ -547,6 +547,7 @@ define(["dojo/_base/declare"], function (declare) {
|
|||||||
return tmp.firstChild;
|
return tmp.firstChild;
|
||||||
},
|
},
|
||||||
updateCurrentUnread: function() {
|
updateCurrentUnread: function() {
|
||||||
|
if ($("feed_current_unread")) {
|
||||||
const feed_unread = Feeds.getUnread(Feeds.getActive(), Feeds.activeIsCat());
|
const feed_unread = Feeds.getUnread(Feeds.getActive(), Feeds.activeIsCat());
|
||||||
|
|
||||||
if (feed_unread > 0 && !Element.visible("feeds-holder")) {
|
if (feed_unread > 0 && !Element.visible("feeds-holder")) {
|
||||||
@@ -555,6 +556,7 @@ define(["dojo/_base/declare"], function (declare) {
|
|||||||
} else {
|
} else {
|
||||||
Element.hide("feed_current_unread");
|
Element.hide("feed_current_unread");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onLoaded: function (transport, offset, append) {
|
onLoaded: function (transport, offset, append) {
|
||||||
const reply = App.handleRpcJson(transport);
|
const reply = App.handleRpcJson(transport);
|
||||||
|
|||||||
Reference in New Issue
Block a user