Skip to content

Conversation

@asugar13
Copy link

@asugar13 asugar13 commented Dec 24, 2025

Description

This PR adds optional chaining inside packages/dotcom-ui-header/src/components/top/partials.tsx. This is used as a safe check so that smoke tests can run when using dotcom-tool-kit/n-test. This issue was found while working on the this ticket: https://financialtimes.atlassian.net/browse/LIF-977
Without this change, the following error happens:

Screenshot 2025-12-29 at 10 16 19

Checklist

Please read the contributing guidelines. In particular, please make sure:

  • I've discussed this feature with the Platforms team
  • This feature is stable, i.e. is not an ongoing experiment, temporary workaround, or hack
  • My branch has been rebased onto the latest commit on main (don't merge main into your branch)

@asugar13 asugar13 changed the title Add safe check for userNavAnonItems LIF-977 Add safe check for userNavAnonItems Dec 29, 2025
@asugar13 asugar13 marked this pull request as ready for review December 29, 2025 10:17
@asugar13 asugar13 requested a review from a team as a code owner December 29, 2025 10:17
Copy link
Contributor

@olusoladavid olusoladavid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @asugar13 ,

Thanks for reporting this. Could you further describe the scenario where this was happening? Is it when you run smoke tests locally or does it happen in CI too? The TNavigationData type suggests that we don't expect this property to be sometimes optional, so would be nice to understand the root cause of the issue you're seeing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants