Skip to content

Commit

Permalink
Fix #164
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienbrault committed Jul 19, 2014
1 parent 999ad8b commit 49082ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Hateoas/Serializer/ExclusionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ public function shouldSkipLink($object, Relation $relation, SerializationContext

public function shouldSkipEmbedded($object, Relation $relation, SerializationContext $context)
{
if ($this->shouldSkipRelation($object, $relation, $context)) {
if (null === $relation->getEmbedded()) {
return true;
}

if (null === $relation->getEmbedded()) {
return true;
if (null === $relation->getEmbedded()->getExclusion()) {
return $this->shouldSkipRelation($object, $relation, $context);
}

return $this->shouldSkip($object, $relation->getEmbedded()->getExclusion(), $context);
Expand Down

0 comments on commit 49082ed

Please sign in to comment.