From e7d428a219a5b75ef70a4aff9c5781a978acb0cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Velad=20Galv=C3=A1n?= Date: Thu, 30 Jan 2025 12:38:03 +0100 Subject: [PATCH] fix(UI): Fix show AdStatisticsButton when it's not necessary (#7989) --- ui/ad_statistics_button.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/ad_statistics_button.js b/ui/ad_statistics_button.js index f95c0799a7..0395ecbdb9 100644 --- a/ui/ad_statistics_button.js +++ b/ui/ad_statistics_button.js @@ -78,6 +78,8 @@ shaka.ui.AdStatisticsButton = class extends shaka.ui.Element { /** @private {!shaka.extern.AdsStats} */ this.currentStats_ = this.adManager.getStats(); + shaka.ui.Utils.setDisplay(this.button_, this.currentStats_.started > 0); + /** @private {!Map} */ this.displayedElements_ = new Map();