File tree 1 file changed +5
-7
lines changed
1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export class Attributes {
19
19
this . base = base
20
20
this . dynamicAttributes = [ ]
21
21
this . childClone = null
22
- this . initialState = { className : this . base . element . className }
22
+ this . initialState = { classList : this . base . element . classList }
23
23
24
24
this . _getDynamicAttributes ( )
25
25
}
@@ -35,10 +35,6 @@ export class Attributes {
35
35
}
36
36
}
37
37
38
- get baseClasses ( ) {
39
- return this . initialState . className . split ( ' ' )
40
- }
41
-
42
38
async evaluate ( ) {
43
39
await this . evaluateClass ( )
44
40
await this . evaluateText ( )
@@ -69,10 +65,12 @@ export class Attributes {
69
65
const expr = this . base . element . getAttribute ( ':class' )
70
66
if ( ! expr ) return
71
67
72
- this . base . element . className = await this . base . _interpret ( expr , {
73
- base : this . baseClasses ,
68
+ const updatedClassNames = await this . base . _interpret ( expr , {
69
+ base : this . initialState . classList ,
74
70
isClass : true ,
75
71
} )
72
+
73
+ this . base . element . setAttribute ( 'class' , updatedClassNames )
76
74
}
77
75
78
76
async evaluateText ( ) {
You can’t perform that action at this time.
0 commit comments