fix: unescape and decode URI

This commit is contained in:
EnixCoda 2019-12-26 00:07:43 +08:00
parent 193fb1f313
commit 99733e78ad
No known key found for this signature in database
GPG key ID: 0C1A07377913A1DD

View file

@ -10,7 +10,7 @@ export function parse(): MetaData & { path: string[] } {
repoName,
type,
...path // should be [...branchName.split('/'), ...filePath.split('/')]
] = pathname.split('/')
] = unescape(decodeURIComponent(pathname)).split('/')
return {
userName,
repoName,