fixed closeNav function throwing an error
All checks were successful
CSGOWTF/csgowtf/pipeline/head This commit looks good

This commit is contained in:
cnachtigall1991
2021-10-20 18:14:25 +02:00
parent ed1893ffc5
commit 81e1bf251a
3 changed files with 10 additions and 9 deletions

View File

@@ -3,9 +3,10 @@ export const setTitle = (title) => {
}
export const closeNav = (navSelector) => {
const nav = document.querySelector(navSelector)
if (nav.classList.contains('show'))
nav.classList.remove('show')
const nav = document.getElementById(navSelector)
if (nav)
if (nav.classList.contains('show'))
nav.classList.remove('show')
}
export const GetWinLoss = (matchResult, teamId) => {