Problem/Motivation

App crashes with JS error when you go to /recipe-category/main-courses, or /tags/egg because on these pages the currentPageTitle is an object that contains #markup and #allowed_tags and not a string.

Steps to reproduce

Navigate to /recipe-category/main-courses or /tags/egg (or any of the recipe category or tags)

Proposed resolution

Change the currentPageTitle prop type to JSX.Element in breadcrumb.template-info.json to handle different types.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork jsx-3398415

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

hooroomoo created an issue. See original summary.

hooroomoo’s picture

Status: Active » Needs review
hooroomoo’s picture

Issue summary: View changes
StatusFileSize
new87.04 KB

effulgentsia made their first commit to this issue’s fork.

effulgentsia’s picture

Status: Needs review » Fixed

Yep, this prop was incorrectly declared and JSX.Element is more appropriate, so merged.

I also opened #3398446: Add type coercion logic to jsx.engine so that themes can declare prop types based on their needs, not on knowledge of Drupal internals to add more resilience to the system (requesting a different type should not cause a fatal error) and #3398448: Document how a theme should choose which types for a component's props to provide information about how to select the best type.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.