Remove one pointer too many
This commit is contained in:
parent
e534fc8ec4
commit
6f9ac80c39
1 changed files with 3 additions and 3 deletions
|
@ -139,7 +139,7 @@ func UnmarshalPreprocessed(
|
|||
// Find an attribute in an ActivityPub object of the given type
|
||||
// Returns a pointer to the found attribute and whether it found it
|
||||
// 2nd parameter is true if the attribute was found, false otherwise
|
||||
func FindAttribute[T BaseApChain](object BaseApChain) (*T, bool) {
|
||||
func FindAttribute[T BaseApChain](object BaseApChain) (T, bool) {
|
||||
var obj T
|
||||
var ok bool
|
||||
// Try and cast object into wanted type
|
||||
|
@ -150,8 +150,8 @@ func FindAttribute[T BaseApChain](object BaseApChain) (*T, bool) {
|
|||
object, ok = object.GetSelfOrBase()
|
||||
// If this is the final object in the chain, cancel and return false
|
||||
if !ok {
|
||||
return nil, false
|
||||
return obj, false
|
||||
}
|
||||
}
|
||||
return &obj, true
|
||||
return obj, true
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue