diff --git a/core/modules/views_ui/js/views-admin.es6.js b/core/modules/views_ui/js/views-admin.es6.js index f72495ab3a..98e3437c55 100644 --- a/core/modules/views_ui/js/views-admin.es6.js +++ b/core/modules/views_ui/js/views-admin.es6.js @@ -535,7 +535,9 @@ } option.$div.toggle(found); - activeViews += found; + if (found) { + activeViews++; + } }); // Adapt dialog to content size. diff --git a/core/modules/views_ui/js/views-admin.js b/core/modules/views_ui/js/views-admin.js index acb86c77f7..2b755c4650 100644 --- a/core/modules/views_ui/js/views-admin.js +++ b/core/modules/views_ui/js/views-admin.js @@ -284,7 +284,9 @@ } option.$div.toggle(found); - activeViews += found; + if (found) { + activeViews++; + } }); $(event.target).trigger('dialogContentResize');