mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-19 02:21:32 +08:00
Avoid optional chaining in non-transpiled webhook code. Use getElementById instead of queryselectorall for the single id fetch.
This commit is contained in:
@@ -8,8 +8,10 @@
|
||||
|
||||
function newsSeen(currentGalaxyVersion) {
|
||||
// When it's seen, remove the red indicator if it exists and store the current version.
|
||||
const newsIndicator = document.querySelector("#news-indicator");
|
||||
newsIndicator?.remove();
|
||||
const newsIndicator = document.getElementById("news-indicator");
|
||||
if (newsIndicator) {
|
||||
newsIndicator.remove();
|
||||
}
|
||||
window.localStorage.setItem("galaxy-news-seen-release", currentGalaxyVersion);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user