mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-04 08:01:34 -04:00
945 - Fixed the javascript so it's not breaking every page this element is not on
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
(function (window) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// Show the current year
|
||||
document.getElementById("current-year").innerHTML = new Date().getFullYear();
|
||||
const currentYearElement = document.getElementById("current-year");
|
||||
|
||||
|
||||
})(window);
|
||||
if (currentYearElement) {
|
||||
currentYearElement.textContent = new Date().getFullYear();
|
||||
}
|
||||
})(window);
|
||||
Reference in New Issue
Block a user