Skip to content

Commit

Permalink
Merge pull request #2856 from ONLYOFFICE/fix/fix-bugs
Browse files Browse the repository at this point in the history
[common] Fix set icon class function
  • Loading branch information
JuliaRadzhabova authored Feb 21, 2024
2 parents 444c46c + 47edd10 commit e72340c
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 e72340c

Please sign in to comment.