diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-10-27 18:44:04 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-10-27 18:44:04 +0100 |
commit | 7a4c6bc326d603197c53fa67073e774af062e998 (patch) | |
tree | 6af436103b8498613694c6a43f4bcff07db9df35 | |
parent | 6ab386ae3517f9f580604a78a383f4a64f683355 (diff) | |
download | gitbook-7a4c6bc326d603197c53fa67073e774af062e998.zip gitbook-7a4c6bc326d603197c53fa67073e774af062e998.tar.gz gitbook-7a4c6bc326d603197c53fa67073e774af062e998.tar.bz2 |
Fix calcul of root in gitbook.state when serving index.html as /
-rw-r--r-- | theme/javascript/state.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/theme/javascript/state.js b/theme/javascript/state.js index 5e9083f..fb91f7a 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)) ); }; |