Skip to content

Commit

Permalink
fix(utils.dom): fix utils.dom error (#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.

[#21048](#21048)
  • Loading branch information
fw6 authored Jun 24, 2021
1 parent 318e89b commit cde441f
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 cde441f

Please sign in to comment.