Skip to content

Commit

Permalink
Optional chain expression instead
Browse files Browse the repository at this point in the history
  • Loading branch information
bjarnef committed Aug 5, 2024
1 parent 3c37dc0 commit c5b84ca
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const dateObserver = new (class {
if (this.elements.has(element)) return;
this.elements.add(element);
const date = element.date;
if (date && date.getTime()) {
if (date?.getTime()) {
const ms = getUnitFactor(element);
const time = Date.now() + ms;
if (time < this.time) {
Expand Down

0 comments on commit c5b84ca

Please sign in to comment.