Commit d549bdb3 authored by Jakob P's avatar Jakob P
Browse files

Issue #3336787: TypeError in commerce_product if enable admin_toolbar_extra

parent bcef584b
Loading
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -67,11 +67,10 @@ class MenuLinkEntity extends MenuLinkDefault {
   * {@inheritdoc}
   */
  public function getDescription() {
    // @todo Remove node_type special handling.
    if ($this->entity instanceof EntityDescriptionInterface || $this->entity instanceof NodeTypeInterface) {
      return $this->entity->getDescription();
    if (method_exists($this->entity, 'getDescription')) {
      $description = $this->entity->getDescription();
    }
    return parent::getDescription();
    return $description ?? parent::getDescription();
  }

  /**