File tree 1 file changed +9
-8
lines changed
1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -28,16 +28,17 @@ export default class Entity {
28
28
return ! ! this . uuid
29
29
}
30
30
31
+ isDynamicAttribute ( attr ) {
32
+ if ( ! attr . startsWith ( ':' ) ) return false
33
+ if ( MiniJS . allCustomBindings . includes ( attr ) ) return false
34
+ if ( this . allEvents . includes ( attr ) ) return false
35
+ return true
36
+ }
37
+
31
38
_getDynamicAttributes ( ) {
32
39
for ( let i = 0 ; i < this . element . attributes . length ; i ++ ) {
33
40
const attr = this . element . attributes [ i ]
34
- if ( MiniJS . allCustomBindings . includes ( attr . name ) ) continue
35
- if (
36
- MiniJS . allEvents . includes ( attr . name ) ||
37
- this . allEvents . includes ( attr . name )
38
- )
39
- continue
40
- if ( ! attr . name . startsWith ( ':' ) ) continue
41
+ if ( ! this . isDynamicAttribute ( attr . name ) ) continue
41
42
if ( this . dynamicAttributes . includes ( attr . name ) ) continue
42
43
this . dynamicAttributes . push ( attr . name )
43
44
}
@@ -273,7 +274,7 @@ export default class Entity {
273
274
else if ( attribute === ':text' ) this . evaluateText ( )
274
275
else if ( [ ':value' , ':checked' ] . includes ( attribute ) ) this . evaluateValue ( )
275
276
else if ( attribute === ':each' ) this . evaluateEach ( )
276
- else {
277
+ else if ( this . isDynamicAttribute ( attribute ) ) {
277
278
if ( ! this . dynamicAttributes . includes ( attribute ) )
278
279
this . dynamicAttributes . push ( attribute )
279
280
this . evaluateDynamicAttributes ( )
You can’t perform that action at this time.
0 commit comments