fix(proxy): guard nil SupportModels before dereference in setModelCache
This commit is contained in:
1 parent
963da99fd6
commit
aa0d87f132
1 file changed
+1
-1
@@ -34,7 +34,7 @@ func (p *Proxy) setModelCache() error {
|
||||
for _, sm := range k.SupportModelsArray {
|
||||
models[sm] = true
|
||||
}
|
||||
} else {
|
||||
} else if k.SupportModels != nil {
|
||||
var sma []string
|
||||
json.Unmarshal([]byte(*k.SupportModels), &sma) // nolint:errCheck
|
||||
for _, sm := range sma {
|
||||
|
||||
Reference in new issue
Block a user