Add error logging to updateClockAndEvents
This commit is contained in:
1 parent
f08534796b
commit
a6b557b93e
1 file changed
+4
@@ -771,6 +771,7 @@ var effect = (VANTA.CLOUDS2 || VANTA.CLOUDS)({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function updateClockAndEvents() {
|
function updateClockAndEvents() {
|
||||||
|
try {
|
||||||
var now = new Date();
|
var now = new Date();
|
||||||
|
|
||||||
// Real-time clock hands and digital
|
// Real-time clock hands and digital
|
||||||
@@ -912,6 +913,9 @@ if (moonTimes.set) {
|
|||||||
var moonZenithWhen = moonZenith && moonZenith > now ? formatDateLong(moonZenith) : '';
|
var moonZenithWhen = moonZenith && moonZenith > now ? formatDateLong(moonZenith) : '';
|
||||||
document.getElementById('moon-zenith-value').textContent = moonZenith ? formatTimeHM(moonZenith) : '--:--';
|
document.getElementById('moon-zenith-value').textContent = moonZenith ? formatTimeHM(moonZenith) : '--:--';
|
||||||
document.getElementById('moon-zenith-when').textContent = moonZenithWhen ? '· ' + moonZenithWhen : '';
|
document.getElementById('moon-zenith-when').textContent = moonZenithWhen ? '· ' + moonZenithWhen : '';
|
||||||
|
} catch (e) {
|
||||||
|
console.log('updateClock error:', e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var startTime = Date.now();
|
var startTime = Date.now();
|
||||||
|
|||||||
Reference in new issue
Block a user