diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-11-25 11:49:55 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-11-25 11:49:55 +0100 |
commit | 93b401ca9f7a78ca285ec6aaa038358b5aec5d2f (patch) | |
tree | c7a7178444bb6481c84e09adb3cfbd4807f81df2 /theme/javascript/state.js | |
parent | b137d8270a8c27e87db0df69039114ef7fa139f1 (diff) | |
download | gitbook-93b401ca9f7a78ca285ec6aaa038358b5aec5d2f.zip gitbook-93b401ca9f7a78ca285ec6aaa038358b5aec5d2f.tar.gz gitbook-93b401ca9f7a78ca285ec6aaa038358b5aec5d2f.tar.bz2 |
Add trailing slash to gitbook.state.root, fix value of gitbook.state.bookRoot
Diffstat (limited to 'theme/javascript/state.js')
-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 e384e36..ef1eb04 100644 --- a/theme/javascript/state.js +++ b/theme/javascript/state.js @@ -27,7 +27,7 @@ state.update = function(dom) { state.root = url.resolve( location.protocol+'//'+location.host, path.dirname(path.resolve(location.pathname.replace(/\/$/, '/index.html'), state.basePath)) - ); + ).replace(/\/?$/, '/'); // Absolute root to the language (for multilingual book) state.bookRoot = state.innerLanguage? url.resolve(state.root, '..') : state.root; |