diff --git a/js/notice_manager_panel.js b/js/notice_manager_panel.js
index 9f151ae..78ca285 100644
--- a/js/notice_manager_panel.js
+++ b/js/notice_manager_panel.js
@@ -150,9 +150,9 @@ var NoticeManager = (function ($, document) {
getNotices: () => notices,
getNoticesTopPriority: () => {
- if ( notices.filter( selectors_error.join(", ") ).length )
+ if (notices.filter(":visible").filter(selectors_error.join(", ")).length)
return 'error';
- if ( notices.filter( selectors_warning.join(", ") ).length )
+ if (notices.filter(":visible").filter(selectors_warning.join(", ")).length)
return 'warning';
return 'notice';
},
@@ -186,7 +186,7 @@ var NoticeManager = (function ($, document) {
addCounter: () => {
if (!button.children('.plugin-count').length){
button.append(
- $("").text(notices.length).attr({
+ $("").text(notices.filter(":visible").length).attr({
class: "plugin-count",
}).addClass(NoticeManager.getNoticesTopPriority())
);