Skip to content

Commit 7943604

Browse files
committed
fix: use path.join
1 parent 0cf2435 commit 7943604

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/plugin.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
var path = require("path");
12
var urlJoin = require("url-join");
23
var BugReporter = require("./BugReporter");
34
var findAllPositions = require("position-map-text-to-markdown").findAllPositions;
@@ -51,7 +52,7 @@ window.require(["gitbook"], function(gitbook) {
5152
reportElement.setAttribute("style", "position:fixed; right:0;bottom:0;");
5253
var clickEvent = ("ontouchstart" in window) ? "touchend" : "click";
5354
reportElement.addEventListener(clickEvent, function(event) {
54-
var pathname = urlJoin(gitbook.state.config.root, gitbook.state.filepath);
55+
var pathname = path.join(gitbook.state.config.root, gitbook.state.filepath);
5556
var apiURL = getAPIURL(config, pathname);
5657
var resourceURL = getResourceURL(config, pathname, "master");
5758
var editURL = getEditURL(config, gitbook.state.filepath, "master");

0 commit comments

Comments
 (0)