Skip to content

Commit

Permalink
fix issue with getting property of undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytroshch committed Oct 11, 2023
1 parent 25bd0d0 commit 3a8039e
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/StrategyEditor/StrategyEditor.helpers.js
Original file line number Diff line number Diff line change
@@ -275,7 +275,7 @@ export const processMarketChangeInStrategy = (nextMarket, markets) => {
}

const isMarginPair = _includes(market?.contexts, 'm')
const isDerivativePair = isDerivativeCcy(market.wsID)
const isDerivativePair = isDerivativeCcy(market?.wsID)
if (!isMarginPair) {
options[STRATEGY_OPTIONS_KEYS.MARGIN] = isDerivativePair
}
Original file line number Diff line number Diff line change
@@ -89,7 +89,7 @@ const StrategySettingsModal = (props) => {

const isPairSelected = !_isEmpty(symbol)
const isDerivativePair = useMemo(
() => getIsDerivativePair(symbol.wsID),
() => getIsDerivativePair(symbol?.wsID),
[symbol, getIsDerivativePair],
)

0 comments on commit 3a8039e

Please sign in to comment.