mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-16 15:45:13 +00:00
Add trailing slash to gitbook.state.root, fix value of gitbook.state.bookRoot
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user