Skip to content

Commit 2f8ec44

Browse files
committed
null -> undefined
1 parent b5ce2fa commit 2f8ec44

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

frameworks/non-keyed/quel/src/myappMain.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const html = `
4949

5050
class ViewModel {
5151
data = [];
52-
selectedIndex = null;
52+
selectedIndex;
5353

5454
get "data.*.selected"() {
5555
return this.$1 === this.selectedIndex;
@@ -60,7 +60,7 @@ class ViewModel {
6060
}
6161
}
6262
select(e, $1) {
63-
if (this.selectedIndex !== null) {
63+
if (typeof this.selectedIndex !== "undefined") {
6464
this[`data.${this.selectedIndex}.selected`] = false;
6565
}
6666
this[`data.${$1}.selected`] = true;
@@ -70,11 +70,11 @@ class ViewModel {
7070
}
7171
run() {
7272
this.data = buildData(1000);
73-
this.selectedIndex = null;
73+
this.selectedIndex = undefined;
7474
}
7575
runLots() {
7676
this.data = buildData(10000);
77-
this.selectedIndex = null;
77+
this.selectedIndex = undefined;
7878
}
7979
add() {
8080
this.data = this.data.concat(buildData(1000));

0 commit comments

Comments
 (0)