For gtn/news frames, ensure frame is engaged prior to dismissal.

Guarding here is simpler than tracking event handlers and making
assumptions.
This commit is contained in:
Dannon Baker
2022-01-05 08:49:55 -05:00
parent b9505426e2
commit c6bcea5a8c
2 changed files with 8 additions and 2 deletions
+4 -1
View File
@@ -3,7 +3,10 @@
var lastUpdate = 0;
function removeOverlay() {
document.getElementById("gtn-container").style.visibility = "hidden";
const container = document.getElementById("gtn-container");
if (container) {
container.style.visibility = "hidden";
}
}
function showOverlay() {
+4 -1
View File
@@ -1,6 +1,9 @@
(function () {
function hideNewsOverlay() {
document.getElementById("news-container").style.visibility = "hidden";
const container = document.getElementById("news-container");
if (container) {
container.style.visibility = "hidden";
}
}
function newsSeen() {