From d7b6e1dc2dc85c01ed63ab158b00a7f46abdebcc Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" Date: Mon, 1 Apr 2024 12:44:20 +0200 Subject: [PATCH] Hide bidge unless >1 datasets (#643) --- src/DebugBar/Resources/debugbar.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/DebugBar/Resources/debugbar.js b/src/DebugBar/Resources/debugbar.js index 5984e3d1..9780aaf8 100644 --- a/src/DebugBar/Resources/debugbar.js +++ b/src/DebugBar/Resources/debugbar.js @@ -949,7 +949,8 @@ if (typeof(PhpDebugBar) == 'undefined') { if (this.datasetTab) { this.datasetTab.set('data', this.datasets); - this.datasetTab.set('badge', getObjectSize(this.datasets)); + var datasetSize = getObjectSize(this.datasets); + this.datasetTab.set('badge', datasetSize > 1 ? datasetSize : null); this.datasetTab.$tab.show(); }