add check that url param exists

This commit is contained in:
tjs 2022-04-15 16:55:39 -04:00
parent be0995af25
commit d03db04d72
2 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ export const LANGS = [
const CUSTOM_NODE = NODE_URLS.find((n) => n.label === 'Custom')
export const NODE_URL_KEY = 'node-url-key-0.6'
export const NODE_URL_KEY = 'node-url-key-0.7'
export const DEFAULT_MARKET_KEY = 'defaultMarket-0.3'
export const ORDERBOOK_FLASH_KEY = 'showOrderbookFlash'
export const DEFAULT_SPOT_MARGIN_KEY = 'defaultSpotMargin'

View File

@ -89,7 +89,7 @@ const PerpMarket: React.FC = () => {
if (name && groupConfig) {
marketQueryParam = name.toString().split(/-|\//)
marketBaseSymbol = marketQueryParam[0]
marketType = marketQueryParam[1].includes('PERP') ? 'perp' : 'spot'
marketType = marketQueryParam[1]?.includes('PERP') ? 'perp' : 'spot'
newMarket = getMarketByBaseSymbolAndKind(
groupConfig,