mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-20 17:43:24 +00:00
Fix calcul of root in gitbook.state when serving index.html as /
This commit is contained in:
@@ -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))
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user