mirror of
https://github.com/thelounge/thelounge
synced 2024-11-22 12:03:11 +00:00
Check if element exists before trying to change message
This commit is contained in:
parent
77947b46c8
commit
d9206c1087
1 changed files with 9 additions and 5 deletions
|
@ -9,7 +9,15 @@
|
|||
*/
|
||||
|
||||
(function() {
|
||||
document.getElementById("loading-page-message").textContent = "Loading the app…";
|
||||
const msg = document.getElementById("loading-page-message");
|
||||
|
||||
if (msg) {
|
||||
msg.textContent = "Loading the app…";
|
||||
|
||||
document.getElementById("loading-reload").addEventListener("click", function() {
|
||||
location.reload(true);
|
||||
});
|
||||
}
|
||||
|
||||
var displayReload = function displayReload() {
|
||||
var loadingReload = document.getElementById("loading-reload");
|
||||
|
@ -32,10 +40,6 @@
|
|||
}
|
||||
}, 5000);
|
||||
|
||||
document.getElementById("loading-reload").addEventListener("click", function() {
|
||||
location.reload();
|
||||
});
|
||||
|
||||
window.g_LoungeErrorHandler = function LoungeErrorHandler(e) {
|
||||
var message = document.getElementById("loading-page-message");
|
||||
message.textContent = "An error has occurred that prevented the client from loading correctly.";
|
||||
|
|
Loading…
Reference in a new issue