diff --git a/apps/documenteditor/mobile/src/view/settings/Navigation.jsx b/apps/documenteditor/mobile/src/view/settings/Navigation.jsx index 87d626c9c..365b1246b 100644 --- a/apps/documenteditor/mobile/src/view/settings/Navigation.jsx +++ b/apps/documenteditor/mobile/src/view/settings/Navigation.jsx @@ -8,8 +8,13 @@ const NavigationPopover = props => { const _t = t('Settings', {returnObjects: true}); const api = Common.EditorApi.get(); const navigationObject = api.asc_ShowDocumentOutline(); - const [currentPosition, setCurrentPosition] = useState(navigationObject.get_CurrentPosition()); - const arrHeaders = props.updateNavigation(); + const [currentPosition, setCurrentPosition] = useState(navigationObject ? navigationObject.get_CurrentPosition() : null); + + let arrHeaders = []; + + if(currentPosition) { + arrHeaders = props.updateNavigation(); + } return (