Commit 8919b596 authored by Andy Cobaugh's avatar Andy Cobaugh

wait: avoid potential panic in case v is nil

parent beeccafa
Pipeline #106208 passed with stage
in 20 seconds
......@@ -225,7 +225,7 @@ func ciWaitVersionCompare(initialBody []byte, newBody []byte, commit string, ver
// look for long commit, comparing the first len(commit) characters
if commit != "" {
for _, k := range ciWaitCommitFields {
if v := nb[k]; v != "" {
if v := nb[k]; v != "" && v != nil {
l := len(v.(string))
if len(commit) >= l {
return v == commit[:l]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment