Skip to content

Commit

Permalink
Hide bidge unless >1 datasets (#643)
Browse files Browse the repository at this point in the history
  • Loading branch information
barryvdh authored Apr 1, 2024
1 parent 2a722cc commit d7b6e1d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/DebugBar/Resources/debugbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit d7b6e1d

Please sign in to comment.