Ocpp: fix hasProperty() (#15550)
This commit is contained in:
parent
f7df472b4b
commit
fa0a438ebc
1 changed files with 1 additions and 1 deletions
|
|
@ -333,7 +333,7 @@ func (c *OCPP) hasMeasurement(val types.Measurand) bool {
|
|||
// hasProperty checks if comma-separated string contains given string ignoring whitespaces
|
||||
func (c *OCPP) hasProperty(props string, prop string) bool {
|
||||
return slices.ContainsFunc(strings.Split(props, ","), func(s string) bool {
|
||||
return prop == strings.TrimSpace(s)
|
||||
return strings.HasPrefix(strings.ReplaceAll(s, " ", ""), prop)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue