Badge with value 0 should use p-badge-no-gutter class #10257
Labels
LTS-FIXED-11.4.6
Fixed in PrimeNG LTS 11.4.6
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
I'm submitting a ... (check one with "x")
Current behavior
Badge component do not use p-badge-no-gutter class with values of length 1 in case of the value 0.
Expected behavior
Badge component should use p-badge-no-gutter class for value 0 as well.
This is the code which is not correct for the value 0:
'p-badge-no-gutter': this.value && String(this.value).length === 1,
should be:
'p-badge-no-gutter': this.value !== undefined && String(this.value).length === 1,
Reproduce:
The text was updated successfully, but these errors were encountered: