File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
frameworks/non-keyed/quel/src Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ const html = `
49
49
50
50
class ViewModel {
51
51
data = [ ] ;
52
- selectedIndex = null ;
52
+ selectedIndex ;
53
53
54
54
get "data.*.selected" ( ) {
55
55
return this . $1 === this . selectedIndex ;
@@ -60,7 +60,7 @@ class ViewModel {
60
60
}
61
61
}
62
62
select ( e , $1 ) {
63
- if ( this . selectedIndex !== null ) {
63
+ if ( typeof this . selectedIndex !== "undefined" ) {
64
64
this [ `data.${ this . selectedIndex } .selected` ] = false ;
65
65
}
66
66
this [ `data.${ $1 } .selected` ] = true ;
@@ -70,11 +70,11 @@ class ViewModel {
70
70
}
71
71
run ( ) {
72
72
this . data = buildData ( 1000 ) ;
73
- this . selectedIndex = null ;
73
+ this . selectedIndex = undefined ;
74
74
}
75
75
runLots ( ) {
76
76
this . data = buildData ( 10000 ) ;
77
- this . selectedIndex = null ;
77
+ this . selectedIndex = undefined ;
78
78
}
79
79
add ( ) {
80
80
this . data = this . data . concat ( buildData ( 1000 ) ) ;
You can’t perform that action at this time.
0 commit comments