Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

kate/78896/ TrackJS: a.markets.forex is undefined #7328

Conversation

kate-deriv
Copy link
Contributor

The issue comes from Japan accounts (and only one from Norway): this.markets (line 126) is an object which has NO forex key, the only available is synthetics (see the screenshot of console in the card). So, the simple check with if for undefined was implemented.

Note 1: I couldn't use optional chaining (delete this.markets?.forex.submarkets?.smart_fx) because of an error from babel. The option below also couldn't be used, as I got an error from eslint:
this.markets.forex && delete this.markets.forex.submarkets.smart_fx;

Note 2: In local host there was an error about the missing key in <React.Fragment> after using map method, so I decided to fix it by adding an index.

Copy link
Contributor

@maryia-deriv maryia-deriv left a comment

Choose a reason for hiding this comment

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

👍🏻

@vercel
Copy link

vercel bot commented Jan 31, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
binary-static ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 8, 2023 at 5:56AM (UTC)

Copy link
Contributor

@maryia-matskevich-deriv maryia-matskevich-deriv left a comment

Choose a reason for hiding this comment

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

LGTM

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 8, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants