mirror of
1
Fork 0

Make code cleaner

Signed-off-by: Gary Kim <gary@garykim.dev>
This commit is contained in:
Gary Kim 2019-08-02 16:06:08 +08:00
parent d7788bff7d
commit 582a180621
No known key found for this signature in database
GPG Key ID: 9349B59FB54594AC
1 changed files with 1 additions and 4 deletions

View File

@ -662,10 +662,7 @@ func sha1CurrentPatternProcessor(ctx *postProcessCtx, node *html.Node) {
// a commit in the repository before making it a link.
if ctx.metas["repoPath"] != "" {
repo, err := git.OpenRepository(ctx.metas["repoPath"])
if err != nil {
return
}
if !repo.IsCommitExist(hash) {
if err != nil || !repo.IsCommitExist(hash) {
return
}
}