Tolerate the lack of a sidebar.

This commit is contained in:
Georg Brandl
2010-11-21 14:02:03 +01:00
parent 53d237a4eb
commit fc9549767c
+3
View File
@@ -29,6 +29,9 @@ $(function() {
var sidebar = $('.sphinxsidebar');
var sidebarwrapper = $('.sphinxsidebarwrapper');
// for some reason, the document has no sidebar; do not run into errors
if (!sidebar.length) return;
// original margin-left of the bodywrapper and width of the sidebar
// with the sidebar expanded
var bw_margin_expanded = bodywrapper.css('margin-left');