From ea4082059e3502f9d3d4d63e011ff8103b688607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yi=C4=9Fit=20FINDIKLI?= Date: Thu, 10 Dec 2020 15:19:57 +0300 Subject: [PATCH] Refactor #753 --- 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 804900dcb..242405315 100644 --- a/src/components/badge/BadgeDirective.js +++ b/src/components/badge/BadgeDirective.js @@ -34,8 +34,9 @@ const BadgeDirective = { if (options.oldValue !== options.value) { let badge = document.getElementById(el.$_pbadgeId); - if (options.value && DomHandler.hasClass(badge, 'p-badge-dot')) { - DomHandler.removeClass(badge, 'p-badge-dot'); + if (options.value) { + 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');