aboutsummaryrefslogtreecommitdiff
path: root/static/clock.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/clock.js')
-rw-r--r--static/clock.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/static/clock.js b/static/clock.js
index b7777a08..9642ebaf 100644
--- a/static/clock.js
+++ b/static/clock.js
@@ -49,10 +49,14 @@ class SmallcalCellHighlight extends Clock {
this.current_cell.style.border = "";
}
+ /* This is expeced to fail if the current date is not
+ currently on screen. */
this.current_cell = this.small_cal.querySelector(
"time[datetime='" + now.format("~Y-~m-~d") + "']");
- this.current_cell.style.border = "1px solid black";
+ if (this.current_cell) {
+ this.current_cell.style.border = "1px solid black";
+ }
}
}