From 0857d5e7e4fc2c2e43d72d9eb0948a3a2b5a6a72 Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Thu, 10 Dec 2020 15:34:41 +0300 Subject: [PATCH] Refactor --- src/components/badge/BadgeDirective.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/badge/BadgeDirective.js b/src/components/badge/BadgeDirective.js index 242405315..1a4c26110 100644 --- a/src/components/badge/BadgeDirective.js +++ b/src/components/badge/BadgeDirective.js @@ -35,8 +35,9 @@ const BadgeDirective = { let badge = document.getElementById(el.$_pbadgeId); if (options.value) { - if (DomHandler.hasClass(badge, 'p-badge-dot')) - DomHandler.removeClass(badge, 'p-badge-dot'); + if (DomHandler.hasClass(badge, 'p-badge-dot')) { + DomHandler.removeClass(badge, 'p-badge-dot'); + } if (String(options.value).length === 1) DomHandler.addClass(badge, 'p-badge-no-gutter');