1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-07-23 17:51:56 +02:00

Hide bidge unless >1 datasets (#643)

This commit is contained in:
Barry vd. Heuvel
2024-04-01 12:44:20 +02:00
committed by GitHub
parent 2a722cccf5
commit d7b6e1dc2d

View File

@@ -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();
}