Skip to content

Commit

Permalink
🐛 Fix(custom): optimize github remote delete
Browse files Browse the repository at this point in the history
ISSUES CLOSED: #158
  • Loading branch information
Kuingsmile committed Feb 7, 2024
1 parent 914ec15 commit 0767fbc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/renderer/apis/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ export default class GithubApi {
}

private static createKey (path: string | undefined, fileName: string): string {
const formatedFileName = fileName.replace(/%2F/g, '/')
return path && path !== '/'
? `${path.replace(/^\/+|\/+$/, '')}/${fileName}`
: fileName
? `${path.replace(/^\/+|\/+$/, '')}/${formatedFileName}`
: formatedFileName
}

static async delete (configMap: IConfigMap): Promise<boolean> {
Expand Down

0 comments on commit 0767fbc

Please sign in to comment.