Skip to content

Commit

Permalink
Merge pull request #121 from persistenceOne/deepanshutr/fix
Browse files Browse the repository at this point in the history
Adding fix to allow optional properties when reading properties list.
  • Loading branch information
Deepanshu Tripathi authored Oct 19, 2020
2 parents 00a75f1 + 96bfb33 commit 9367b9b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions schema/types/base/metaProperties.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,13 @@ func ReadMetaProperties(MetaProperties string) (types.MetaProperties, error) {
var metaPropertyList []types.MetaProperty
metaProperties := strings.Split(MetaProperties, constants.PropertiesSeparator)
for _, metaPropertyString := range metaProperties {
metaProperty, Error := ReadMetaProperty(metaPropertyString)
if Error != nil {
return nil, Error
if metaPropertyString != "" {
metaProperty, Error := ReadMetaProperty(metaPropertyString)
if Error != nil {
return nil, Error
}
metaPropertyList = append(metaPropertyList, metaProperty)
}
metaPropertyList = append(metaPropertyList, metaProperty)
}
return NewMetaProperties(metaPropertyList), nil
}

0 comments on commit 9367b9b

Please sign in to comment.