Skip to content

Commit 4210a3b

Browse files
committed
fix(plugin): root should not be empty
1 parent d2c191b commit 4210a3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ window.require(["gitbook"], function(gitbook) {
5252
reportElement.setAttribute("style", "position:fixed; right:0;bottom:0;");
5353
var clickEvent = ("ontouchstart" in window) ? "touchend" : "click";
5454
reportElement.addEventListener(clickEvent, function(event) {
55-
var pathname = path.join(gitbook.state.config.root, gitbook.state.filepath);
55+
var pathname = path.join(gitbook.state.config.root || "./", gitbook.state.filepath);
5656
var apiURL = getAPIURL(config, pathname);
5757
var resourceURL = getResourceURL(config, pathname, "master");
5858
var editURL = getEditURL(config, pathname, "master");

0 commit comments

Comments
 (0)