Skip to content

Conversation

Alam-2U
Copy link

@Alam-2U Alam-2U commented Oct 7, 2025

Description

This PR fixes a crash caused by a recent Paragon update related to the tour component rendering logic.
The issue occurred because the component attempted to access properties (like dismissButtonText) on invalid or false values generated by an incorrect use of the .map() function.

Changes Done

  • Replaced buggy .map() usage with logical && to avoid creating false values.
  • Updated implementation to use a .filter().map() chain to include only valid tour objects.
  • Prevented the runtime error:

    "Cannot use 'in' operator to search for 'dismissButtonText' in false"

  • Ensured stable rendering behavior after the Paragon update and eliminated component crashes.

Jira Ticket: LP-116

@Copilot Copilot AI review requested due to automatic review settings October 7, 2025 07:40
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a crash in the ProductTour component caused by the presence of false values in the tours array due to incorrect use of the .map() function. The issue occurred when the component tried to access properties on these false values after a recent Paragon update.

  • Replaced .map() with conditional logic that created false values with a .filter().map() chain
  • Ensured only valid tour objects are processed to prevent runtime errors
  • Fixed the "Cannot use 'in' operator to search for 'dismissButtonText' in false" error

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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.

2 participants