Skip to content

Commit

Permalink
fix(utils.dom): fix utils.dom error (ElemeFE#21049)
Browse files Browse the repository at this point in the history
In IE browser, If the reference element(slot="reference") under the popover component is a SVG element, an error will be reported.

[ElemeFE#21048](ElemeFE#21048)
  • Loading branch information
fw6 authored and cn3lfs committed Feb 24, 2022
1 parent 3e4ec9c commit 370a9eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export function addClass(el, cls) {
}
}
if (!el.classList) {
el.className = curClass;
el.setAttribute('class', curClass);
}
};

Expand All @@ -112,7 +112,7 @@ export function removeClass(el, cls) {
}
}
if (!el.classList) {
el.className = trim(curClass);
el.setAttribute('class', trim(curClass));
}
};

Expand Down

0 comments on commit 370a9eb

Please sign in to comment.