瀏覽代碼

Merge pull request #46716 from akerouanton/fix-bad-condition

api: fix a nil check on the wrong var
Paweł Gronowski 1 年之前
父節點
當前提交
dcc80204bc
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      api/server/router/container/container_routes.go

+ 1 - 1
api/server/router/container/container_routes.go

@@ -544,7 +544,7 @@ func (s *containerRouter) postContainersCreate(ctx context.Context, w http.Respo
 		}
 	}
 
-	if hostConfig != nil && versions.LessThan(version, "1.44") {
+	if config != nil && versions.LessThan(version, "1.44") {
 		if config.Healthcheck != nil {
 			// StartInterval was added in API 1.44
 			config.Healthcheck.StartInterval = 0