diff --git a/theme/javascript/state.js b/theme/javascript/state.js index 5e9083f7b..fb91f7a2e 100644 --- a/theme/javascript/state.js +++ b/theme/javascript/state.js @@ -23,7 +23,7 @@ state.update = function(dom) { // Absolute url to the root of the book state.root = url.resolve( location.protocol+'//'+location.host, - path.dirname(path.resolve(location.pathname, state.basePath)) + path.dirname(path.resolve(location.pathname.replace(/\/$/, '/index.html'), state.basePath)) ); };