Skip to content

Commit

Permalink
Add safe-guard before adding decorated tagged dataobject to the list
Browse files Browse the repository at this point in the history
  • Loading branch information
michalkleiner committed Feb 29, 2020
1 parent 3bfac13 commit cc1d188
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Models/TaxonomyTerm.php
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,9 @@ public function getTaggedDataObjects(): ArrayList
$relationName = $relation;
}

$list->push(self::decorateTaggedDataObject($owner, $fieldName, $relationName));
if ($owner && $owner->exists()) {
$list->push(self::decorateTaggedDataObject($owner, $fieldName, $relationName));
}
});
}
}
Expand Down

0 comments on commit cc1d188

Please sign in to comment.