Skip to content

Commit

Permalink
consolidate getFirstFrameTime to use optional chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
interim17 committed Sep 11, 2024
1 parent fd88894 commit 27cbafe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/simularium/VisDataCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class VisDataCache {
}

public getFirstFrameTime(): number {
return this.head ? this.head.data.time : -1;
return this.head?.data.time || -1;
}

public getLastFrame(): CachedFrame {
Expand Down

0 comments on commit 27cbafe

Please sign in to comment.