fix check to remove class from null element (#12488)

This commit is contained in:
Katie Davis 2021-01-29 14:10:07 -05:00 committed by GitHub
parent 9a92945609
commit 6a660776fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -115,7 +115,7 @@ var instantClick
function changePage(title, body, newUrl, scrollY, pop) {
var pageContentDiv = document.getElementById("page-content");
var memberMenuButton = document.getElementById("member-menu-button")
if (!memberMenuButton) {
if (memberMenuButton) {
memberMenuButton.classList.remove('showing')
}
document.getElementsByTagName("BODY")[0].replaceChild(body, pageContentDiv)