don't error if content property is nil (#436)
This commit is contained in:
parent
73e9cca701
commit
36b2f2b4e6
|
@ -336,7 +336,7 @@ func ExtractPublicKeyForOwner(i WithPublicKey, forOwner *url.URL) (*rsa.PublicKe
|
||||||
func ExtractContent(i WithContent) (string, error) {
|
func ExtractContent(i WithContent) (string, error) {
|
||||||
contentProperty := i.GetActivityStreamsContent()
|
contentProperty := i.GetActivityStreamsContent()
|
||||||
if contentProperty == nil {
|
if contentProperty == nil {
|
||||||
return "", errors.New("content property was nil")
|
return "", nil
|
||||||
}
|
}
|
||||||
for iter := contentProperty.Begin(); iter != contentProperty.End(); iter = iter.Next() {
|
for iter := contentProperty.Begin(); iter != contentProperty.End(); iter = iter.Next() {
|
||||||
if iter.IsXMLSchemaString() && iter.GetXMLSchemaString() != "" {
|
if iter.IsXMLSchemaString() && iter.GetXMLSchemaString() != "" {
|
||||||
|
|
Loading…
Reference in New Issue