File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/librustdoc/html/static/js Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ if (getSettingValue("hide-sidebar") === "true") {
194194 addClass ( document . documentElement , "hide-sidebar" ) ;
195195}
196196
197- ( function ( ) {
197+ function updateSidebarWidth ( ) {
198198 const desktopSidebarWidth = getSettingValue ( "desktop-sidebar-width" ) ;
199199 if ( desktopSidebarWidth ) {
200200 document . documentElement . style . setProperty (
@@ -209,7 +209,7 @@ if (getSettingValue("hide-sidebar") === "true") {
209209 srcSidebarWidth + "px"
210210 ) ;
211211 }
212- } ( ) ) ;
212+ } ;
213213
214214// If we navigate away (for example to a settings page), and then use the back or
215215// forward button to get back to a page, the theme may have changed in the meantime.
@@ -223,5 +223,6 @@ if (getSettingValue("hide-sidebar") === "true") {
223223window . addEventListener ( "pageshow" , ev => {
224224 if ( ev . persisted ) {
225225 setTimeout ( updateTheme , 0 ) ;
226+ setTimeout ( updateSidebarWidth , 0 ) ;
226227 }
227228} ) ;
You can’t perform that action at this time.
0 commit comments