Skip to content

Commit e4b4aba

Browse files
committed
chore: update classname
1 parent a3f61ef commit e4b4aba

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

components/_util/vnode.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,12 @@ export function cloneElement (n, nodeProps, deep) {
8484
style = { ...style, ...tempStyle }
8585
}
8686

87-
if (typeof data.class === 'string') {
88-
cls[data.class] = true
87+
if (typeof data.class === 'string' && data.class.trim() !== '') {
8988
data.class.split(' ').forEach(c => { cls[c.trim()] = true })
9089
} else {
9190
cls = { ...data.class, ...cls }
9291
}
93-
if (typeof tempCls === 'string') {
92+
if (typeof tempCls === 'string' && tempCls.trim() !== '') {
9493
tempCls.split(' ').forEach(c => { cls[c.trim()] = true })
9594
} else {
9695
cls = { ...cls, ...tempCls }

0 commit comments

Comments
 (0)