Skip to content

Commit 17c1c49

Browse files
committed
Fix jaywcjlove#51 search root path issue.
1 parent 683713f commit 17c1c49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

template/js/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
this.root_path = (function(){
1212
var elm_path = $$('current_path');
1313
var url = window.location.origin+window.location.pathname;
14-
return elm_path ? url.replace(/\/c\/\w+\.html/, '').replace(/\/$/,''):'';
14+
return elm_path ? url.replace(/\/(c\/)?\w+\.html/, '').replace(/\/$/, '') : '';
1515
})();
1616

1717
this.query = ''; //

0 commit comments

Comments
 (0)