Skip to content

Commit 74ff7f8

Browse files
committed
Use the safe navigation operator
1 parent f8d8740 commit 74ff7f8

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/viewer.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,7 @@ class Viewer extends EventEmitter {
5353
}
5454

5555
get showIndex() {
56-
if (!this.showing) {
57-
return null
58-
}
59-
return this.showing.index
56+
return this.showing?.index
6057
}
6158

6259
start() {

0 commit comments

Comments
 (0)