Skip to content

Commit

Permalink
verify entity before walking breadcrumb (#786)
Browse files Browse the repository at this point in the history
  • Loading branch information
seth-shaw-unlv authored Jul 22, 2020
1 parent 75ae02b commit bfab343
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ protected function walkMembership(EntityInterface $entity, &$crumbs) {

// Find the next in the chain, if there are any.
if ($entity->hasField($this->config->get('referenceField')) &&
!$entity->get($this->config->get('referenceField'))->isEmpty()) {
!$entity->get($this->config->get('referenceField'))->isEmpty() &&
$entity->get($this->config->get('referenceField'))->entity instanceof EntityInterface) {
$this->walkMembership($entity->get($this->config->get('referenceField'))->entity, $crumbs);
}
}
Expand Down

0 comments on commit bfab343

Please sign in to comment.