mirror of
https://github.com/MercuryWorkshop/dreamlandjs.git
synced 2025-05-16 15:40:01 -04:00
fix svg classname issue
This commit is contained in:
parent
cbe01c3178
commit
78b4b9ba0d
1 changed files with 2 additions and 2 deletions
|
@ -284,12 +284,12 @@ function h(type, props, ...children) {
|
|||
useProp("class", classlist => {
|
||||
assert(typeof classlist === "string" || classlist instanceof Array, "class must be a string or array");
|
||||
if (typeof classlist === "string") {
|
||||
elm.className = classlist;
|
||||
elm.setAttribute("class", classlist);
|
||||
return;
|
||||
}
|
||||
|
||||
if (isDLPtr(classlist)) {
|
||||
handle(classlist, classname => elm.className = classname);
|
||||
handle(classlist, classname => elm.setAttribute("class", classname));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue