fix: git submodule did not work

This commit is contained in:
EnixCoda 2020-05-01 17:21:02 +08:00
parent 6d7f1a6f79
commit c0d75c2ed3
No known key found for this signature in database
GPG key ID: 0C1A07377913A1DD

View file

@ -1,4 +1,5 @@
import { GITHUB_OAUTH } from 'env'
import { Base64 } from 'js-base64'
import { platform } from 'platforms'
import * as React from 'react'
import { useEvent } from 'react-use'
@ -52,6 +53,7 @@ function parseTreeData(treeData: GitHubAPI.TreeData, metaData: MetaData) {
)
: undefined,
contents: item.type === 'tree' ? [] : undefined,
sha: item.sha,
}
const parentNode = pathToNode.get(path)
if (parentNode && parentNode.contents) {