DEV: ensure class removal when banner doesn't show (#30)

This commit is contained in:
Kris 2023-03-31 10:41:01 -04:00 committed by GitHub
parent f7696c3372
commit 3199fd59d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -42,7 +42,12 @@ export default class DiscourseCategoryBanners extends Component {
}
get shouldRender() {
return this.isVisible && this.keepDuringLoadingRoute;
if (this.isVisible && this.keepDuringLoadingRoute) {
return true;
} else {
document.body.classList.remove("category-header");
return false;
}
}
get safeStyle() {