From 6f8f244e23bd8ae956d3b15258ef9d3241ac4955 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yi=C4=9Fit=20FINDIKLI?= Date: Thu, 10 Dec 2020 13:57:52 +0300 Subject: [PATCH] Refactor #753 --- src/components/badge/BadgeDirective.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/badge/BadgeDirective.js b/src/components/badge/BadgeDirective.js index 279bf2547..804900dcb 100644 --- a/src/components/badge/BadgeDirective.js +++ b/src/components/badge/BadgeDirective.js @@ -34,7 +34,7 @@ const BadgeDirective = { if (options.oldValue !== options.value) { let badge = document.getElementById(el.$_pbadgeId); - if (options.value && DomHandler.hasClass('p-badge-dot')) { + if (options.value && DomHandler.hasClass(badge, 'p-badge-dot')) { DomHandler.removeClass(badge, 'p-badge-dot'); if (String(options.value).length === 1) @@ -42,7 +42,7 @@ const BadgeDirective = { else DomHandler.removeClass(badge, 'p-badge-no-gutter'); } - else if (!options.value && !DomHandler.hasClass('p-badge-dot')) { + else if (!options.value && !DomHandler.hasClass(badge, 'p-badge-dot')) { DomHandler.addClass(badge, 'p-badge-dot'); }