mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
fix(file-explorer): fixes #3
This commit is contained in:
parent
29704ca0f9
commit
f2b7261182
2 changed files with 3 additions and 3 deletions
|
|
@ -27,7 +27,7 @@ export default class List extends preact.Component {
|
|||
const { treeData, metaData } = this.props
|
||||
const { root, nodes } = treeParser.parse(treeData, metaData)
|
||||
this.visibleNodesGenerator.plantTree(root, nodes)
|
||||
const currentPath = URLHelper.getCurrentPath()
|
||||
const currentPath = URLHelper.getCurrentPath(true)
|
||||
this.tasksAfterRender.push(DOMHelper.focusSearchInput)
|
||||
if (currentPath.length) {
|
||||
const nodeExpandedTo = this.visibleNodesGenerator.expandTo(currentPath)
|
||||
|
|
|
|||
|
|
@ -37,9 +37,9 @@ function isInCodePage(metaData = {}) {
|
|||
)
|
||||
}
|
||||
|
||||
function getCurrentPath() {
|
||||
function getCurrentPath(decode = false) {
|
||||
const { path } = parseRaw()
|
||||
return path
|
||||
return decode ? path.map(decodeURIComponent) : path
|
||||
}
|
||||
|
||||
export default {
|
||||
|
|
|
|||
Loading…
Reference in a new issue