mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue