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

Commit

Permalink
kate/78896/ TrackJS: a.markets.forex is undefined (#7328)
Browse files Browse the repository at this point in the history
* fix: add check for undefined values and add key for React Fragment after map method

* refactor: change key for react fragment

* refactor: add an empty commit

---------

Co-authored-by: Matin shafiei <[email protected]>
  • Loading branch information
kate-deriv and matin-deriv authored Feb 8, 2023
1 parent 5c208b9 commit 407bd96
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/javascript/app/pages/trade/markets.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,11 @@ class Markets extends React.Component {
let market_symbol = Defaults.get('market');
const market_list = Symbols.markets();
this.markets = getAvailableUnderlyings(market_list);
delete this.markets.forex.submarkets.smart_fx;

if (this.markets.forex) {
delete this.markets.forex.submarkets.smart_fx;
}

this.underlyings = Symbols.getAllSymbols() || {};
let underlying_symbol = Defaults.get('underlying');

Expand Down Expand Up @@ -585,11 +589,11 @@ class Markets extends React.Component {
<div className='mobile'>
<React.Fragment>
<ul>
{Object.keys(group_markets).map((item) => {
{Object.keys(group_markets).map((item, idx) => {
const derived_category = group_markets[item].markets[0].key;
return (
item === 'none' ? (
<React.Fragment>
<React.Fragment key={`${item}_${idx}`}>
{group_markets[item].markets.map((m) => (
<li
onClick = {scrollToMarket.bind(null, m.key)}
Expand Down

1 comment on commit 407bd96

@vercel
Copy link

@vercel vercel bot commented on 407bd96 Feb 8, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

binary-static – ./

binary-static-git-master.binary.sx
binary-static.binary.sx

Please sign in to comment.