For Bug 57739

This commit is contained in:
SergeyEzhin 2022-06-29 18:48:35 +04:00
parent 2c433a9621
commit 55f3b79061

View file

@ -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 (
<Page>