From 582a18062125045af5cfe6e654239f8232840469 Mon Sep 17 00:00:00 2001 From: Gary Kim Date: Fri, 2 Aug 2019 16:06:08 +0800 Subject: [PATCH] Make code cleaner Signed-off-by: Gary Kim --- modules/markup/html.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/markup/html.go b/modules/markup/html.go index eabdf69a0e..1dcd3389bc 100644 --- a/modules/markup/html.go +++ b/modules/markup/html.go @@ -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 } }