Fix with try/catch
This commit is contained in:
@ -143,6 +143,7 @@ function searchUser(event)
|
|||||||
|
|
||||||
function ajustSearchUserList()
|
function ajustSearchUserList()
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
const searchInputUser = document.getElementById('searchInputUser');
|
const searchInputUser = document.getElementById('searchInputUser');
|
||||||
const pos = searchInputUser.getBoundingClientRect();
|
const pos = searchInputUser.getBoundingClientRect();
|
||||||
const searchResult = document.getElementById('searchResult');
|
const searchResult = document.getElementById('searchResult');
|
||||||
@ -150,6 +151,11 @@ function ajustSearchUserList()
|
|||||||
searchResult.style.width = pos.width + 'px';
|
searchResult.style.width = pos.width + 'px';
|
||||||
searchResult.style.top = pos.top + pos.height + 'px';
|
searchResult.style.top = pos.top + pos.height + 'px';
|
||||||
searchResult.style.left = pos.left + 'px';
|
searchResult.style.left = pos.left + 'px';
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function goBackHome()
|
function goBackHome()
|
||||||
@ -380,12 +386,16 @@ function selectGameModeFour(event, disableScroll = false)
|
|||||||
|
|
||||||
function movePopMenuLoginButton()
|
function movePopMenuLoginButton()
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
const loginButton = document.getElementById('loginButton');
|
const loginButton = document.getElementById('loginButton');
|
||||||
const pos = loginButton.getBoundingClientRect();
|
const pos = loginButton.getBoundingClientRect();
|
||||||
const popMenuLoginButton = document.getElementById('popMenuLoginButton');
|
const popMenuLoginButton = document.getElementById('popMenuLoginButton');
|
||||||
|
|
||||||
popMenuLoginButton.style.left = pos.left + "px";
|
popMenuLoginButton.style.left = pos.left + "px";
|
||||||
popMenuLoginButton.style.top = pos.top + pos.height + "px";
|
popMenuLoginButton.style.top = pos.top + pos.height + "px";
|
||||||
|
} catch {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function showMenu()
|
function showMenu()
|
||||||
|
Reference in New Issue
Block a user