From 47edd10fad7d751ecc11d7b8b2cb2620b1991cb5 Mon Sep 17 00:00:00 2001 From: "Julia.Svinareva" Date: Wed, 21 Feb 2024 21:18:28 +0300 Subject: [PATCH] [common] Fix set icon class function --- apps/common/main/lib/component/Button.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/common/main/lib/component/Button.js b/apps/common/main/lib/component/Button.js index 511922a420..1faefe2f15 100644 --- a/apps/common/main/lib/component/Button.js +++ b/apps/common/main/lib/component/Button.js @@ -779,10 +779,11 @@ define([ if (/svgicon/.test(this.iconCls)) { var icon = /svgicon\s(\S+)/.exec(this.iconCls); svgIcon.attr('xlink:href', icon && icon.length > 1 ? '#' + icon[1] : ''); - } else if (svgIcon.length) { - var icon = /btn-[^\s]+/.exec(this.iconCls); - svgIcon.attr('href', icon ? '#' + icon[0]: ''); } else { + if (svgIcon.length) { + var icon = /btn-[^\s]+/.exec(this.iconCls); + svgIcon.attr('href', icon ? '#' + icon[0]: ''); + } btnIconEl.removeClass(oldCls); btnIconEl.addClass(cls || ''); if (this.options.scaling === false) {