diff --git a/clang-tools-extra/clang-doc/assets/index.js b/clang-tools-extra/clang-doc/assets/index.js index 6a223de66f84a..58a92f049f19f 100644 --- a/clang-tools-extra/clang-doc/assets/index.js +++ b/clang-tools-extra/clang-doc/assets/index.js @@ -2,8 +2,8 @@ function genLink(Ref) { // we treat the file paths different depending on if we're // serving via a http server or viewing from a local var Path = window.location.protocol.startsWith("file") ? - `${window.location.protocol}//${window.location.host}/${Ref.Path}` : - `${window.location.protocol}//${RootPath}/${Ref.Path}`; + `${window.location.protocol}//${RootPath}/${Ref.Path}` : + `${window.location.protocol}//${window.location.host}/${Ref.Path}`; if (Ref.RefType === "namespace") { Path = `${Path}/index.html` } else if (Ref.Path === "") {