Skip to content

Commit

Permalink
[common] Fix set icon class function
Browse files Browse the repository at this point in the history
  • Loading branch information
JuliaSvinareva committed Feb 21, 2024
1 parent 3445fb3 commit 47edd10
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions apps/common/main/lib/component/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 47edd10

Please sign in to comment.