Skip to content

Commit 844f9aa

Browse files
authored
Merge pull request #256 from canjs/fix-search-url-prefix
Fixed search URL prefix bug. Related to #123
2 parents 1dda553 + f7618b1 commit 844f9aa

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules/
22
temp/
33
index.html
4+
.vscode

static/search.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,11 +508,11 @@ var Search = Control.extend({
508508
pathPrefix: (self.options.pathPrefix === '.') ? '' : '/' + self.options.pathPrefix + '/'
509509
},{
510510
docUrl: function(){
511-
if(!docObject.pathToRoot){
511+
if(!self.options.pathPrefix){
512512
return this.url;
513513
}
514514

515-
var root = joinURIs(window.location.href, docObject.pathToRoot);
515+
var root = joinURIs(window.location.href, self.options.pathPrefix);
516516
if(root.substr(-1) === "/"){
517517
root = root.substr(0, root.length-1);
518518
}

0 commit comments

Comments
 (0)