mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-27 23:56:18 +00:00
optimize code
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user