mirror of https://tt-rss.org/git/tt-rss.git
updateCurrentUnread: don't crash if counter element is not available
This commit is contained in:
parent
9f70bb010a
commit
f83836ade9
|
@ -547,13 +547,15 @@ define(["dojo/_base/declare"], function (declare) {
|
||||||
return tmp.firstChild;
|
return tmp.firstChild;
|
||||||
},
|
},
|
||||||
updateCurrentUnread: function() {
|
updateCurrentUnread: function() {
|
||||||
const feed_unread = Feeds.getUnread(Feeds.getActive(), Feeds.activeIsCat());
|
if ($("feed_current_unread")) {
|
||||||
|
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")) {
|
||||||
$("feed_current_unread").innerText = feed_unread;
|
$("feed_current_unread").innerText = feed_unread;
|
||||||
Element.show("feed_current_unread");
|
Element.show("feed_current_unread");
|
||||||
} else {
|
} else {
|
||||||
Element.hide("feed_current_unread");
|
Element.hide("feed_current_unread");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoaded: function (transport, offset, append) {
|
onLoaded: function (transport, offset, append) {
|
||||||
|
|
Loading…
Reference in New Issue