✨ Site > File Tree > Add folder toggle
This commit is contained in:
@@ -40,15 +40,14 @@ class FileTree
|
||||
// Ending `/`
|
||||
path = path.replace(/\/$/, '')
|
||||
|
||||
console.log(path)
|
||||
|
||||
// Starting `.`
|
||||
path = path.replace(/^\./, '')
|
||||
|
||||
// Starting `/`
|
||||
path = path.replace(/^\//, '')
|
||||
|
||||
path = './' + path
|
||||
// Missing starting `./`
|
||||
if(path !== '.' && path.search('./') !== 0)
|
||||
{
|
||||
path = './' + path
|
||||
}
|
||||
|
||||
return path
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user