Fix with try/catch

This commit is contained in:
Misthaa
2024-11-21 15:04:48 +01:00
parent c9ba4355ad
commit d83aaabab7

View File

@ -143,6 +143,7 @@ function searchUser(event)
function ajustSearchUserList()
{
try {
const searchInputUser = document.getElementById('searchInputUser');
const pos = searchInputUser.getBoundingClientRect();
const searchResult = document.getElementById('searchResult');
@ -150,6 +151,11 @@ function ajustSearchUserList()
searchResult.style.width = pos.width + 'px';
searchResult.style.top = pos.top + pos.height + 'px';
searchResult.style.left = pos.left + 'px';
}
catch {
// Do nothing
}
}
function goBackHome()
@ -380,12 +386,16 @@ function selectGameModeFour(event, disableScroll = false)
function movePopMenuLoginButton()
{
try {
const loginButton = document.getElementById('loginButton');
const pos = loginButton.getBoundingClientRect();
const popMenuLoginButton = document.getElementById('popMenuLoginButton');
popMenuLoginButton.style.left = pos.left + "px";
popMenuLoginButton.style.top = pos.top + pos.height + "px";
} catch {
// Do nothing
}
}
function showMenu()