1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-27 23:56:18 +00:00

optimize code

This commit is contained in:
杨顺强
2023-12-08 21:59:45 +08:00
parent 7e1ca1d0cf
commit cd11916843
3 changed files with 11 additions and 8 deletions

View File

@@ -72,6 +72,9 @@ class IndexMdViewer extends React.Component {
// Solving relative paths
if (!re.test(url)) {
if (url.startsWith('./')) {
url = url.slice(2);
}
item.url = serviceURL + '/published/' + slug + '/' + url;
}
// change file url