diff --git a/suite/common/sidebar/sidebarOverlay.js b/suite/common/sidebar/sidebarOverlay.js index a3b96c63611..c7590fdf576 100644 --- a/suite/common/sidebar/sidebarOverlay.js +++ b/suite/common/sidebar/sidebarOverlay.js @@ -73,9 +73,12 @@ function sidebarOverlayInit() var sidebar_menuitem = document.getElementById('menu_sidebar') if (sidebar_element.getAttribute('hidden') == 'true') { sidebar_element.setAttribute('style', 'display:none') - sidebar_menuitem.setAttribute('checked', 'false') + + if (sidebar_menuitem) + sidebar_menuitem.setAttribute('checked', 'false') } else { - sidebar_menuitem.setAttribute('checked', 'true'); + if (sidebar_menuitem) + sidebar_menuitem.setAttribute('checked', 'true'); debug("sidebar = " + sidebar + "\n"); debug("sidebar.resource = " + sidebar.resource + "\n"); diff --git a/xpfe/components/sidebar/resources/sidebarOverlay.js b/xpfe/components/sidebar/resources/sidebarOverlay.js index a3b96c63611..c7590fdf576 100644 --- a/xpfe/components/sidebar/resources/sidebarOverlay.js +++ b/xpfe/components/sidebar/resources/sidebarOverlay.js @@ -73,9 +73,12 @@ function sidebarOverlayInit() var sidebar_menuitem = document.getElementById('menu_sidebar') if (sidebar_element.getAttribute('hidden') == 'true') { sidebar_element.setAttribute('style', 'display:none') - sidebar_menuitem.setAttribute('checked', 'false') + + if (sidebar_menuitem) + sidebar_menuitem.setAttribute('checked', 'false') } else { - sidebar_menuitem.setAttribute('checked', 'true'); + if (sidebar_menuitem) + sidebar_menuitem.setAttribute('checked', 'true'); debug("sidebar = " + sidebar + "\n"); debug("sidebar.resource = " + sidebar.resource + "\n");