Change double negation to single check

This commit is contained in:
Arpit Jasapara 2024-01-19 01:26:25 -08:00
parent 04946d268a
commit 6a8c0524dd
No known key found for this signature in database
GPG Key ID: F10F7691DDA7C0B9
1 changed files with 2 additions and 3 deletions

View File

@ -143,10 +143,9 @@ func (c *config) skipPrompt(p jsonschema.Property, r *renderer) (bool, error) {
for _, properties := range p.Schema.SkipPromptIf.AnyOf {
match := true
for name, property := range properties.Properties {
if v, ok := c.values[name]; ok && v == property.Const {
continue
if v, ok := c.values[name]; !ok || v != property.Const {
match = false
}
match = false
}
if match {
allFalse = false