Fix nil pointer issue with config-service (#953)

This commit is contained in:
qwerty287 2022-06-03 08:17:47 +02:00 committed by GitHub
parent 0426f7c5d0
commit a561058fee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -476,7 +476,7 @@ func PostBuild(c *gin.Context) {
}
// If config extension is active we should refetch the config in case something changed
if server.Config.Services.ConfigService.IsConfigured() {
if server.Config.Services.ConfigService != nil && server.Config.Services.ConfigService.IsConfigured() {
currentFileMeta := make([]*remote.FileMeta, len(configs))
for i, cfg := range configs {
currentFileMeta[i] = &remote.FileMeta{Name: cfg.Name, Data: cfg.Data}