From 729da0495d7131654f3d0c614d47d797f1c331ea Mon Sep 17 00:00:00 2001 From: xing Date: Wed, 15 Feb 2023 00:28:57 +0800 Subject: [PATCH] fix bug --- internal/pkg/cache/headerImages.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/pkg/cache/headerImages.go b/internal/pkg/cache/headerImages.go index 19fc8ba..078a8bf 100644 --- a/internal/pkg/cache/headerImages.go +++ b/internal/pkg/cache/headerImages.go @@ -20,7 +20,7 @@ func getHeaderImages(a ...any) (r []models.PostThumbnail, err error) { ctx := a[0].(context.Context) theme := a[1].(string) meta, err := wpconfig.GetThemeMods(theme) - if err != nil && meta.HeaderImage != "" { + if err == nil && meta.HeaderImage != "" { if "random-uploaded-image" == meta.HeaderImage { headers, er := model.Finds[models.Posts](ctx, model.Conditions( model.Where(model.SqlBuilder{