Fixed Cannot read properties of null (reading 'offsetHeight')
errors in markdown card
closes sentry ADMIN-CAV - the mobile nav element is not always displayed so we should assume we can read it's `offsetHeight` property
This commit is contained in:
parent
37d9e8bb8b
commit
ef71d52ec0
@ -203,7 +203,7 @@ export default class KoenigCardMarkdown extends Component {
|
||||
if (style === fixedBottom) {
|
||||
let mobileNav = document.querySelector('.gh-mobile-nav-bar');
|
||||
|
||||
if (mobileNav.offsetHeight) {
|
||||
if (mobileNav?.offsetHeight) {
|
||||
style = `${style}; bottom: ${mobileNav.offsetHeight}px`;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user