Commit c16c1c71 authored by webchick's avatar webchick

Issue #2328629 by Berdir: Fixed Comment::hasParentComment() tries to load comment with ID 0.

parent 7a615492
......@@ -324,8 +324,7 @@ public static function bundleFieldDefinitions(EntityTypeInterface $entity_type,
* {@inheritdoc}
public function hasParentComment() {
$parent = $this->get('pid')->entity;
return !empty($parent);
return (bool) $this->get('pid')->target_id;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment