Skip to content

Commit

Permalink
fix: add optional chaining in getMinDuration function (binary-com#7344)
Browse files Browse the repository at this point in the history
  • Loading branch information
kate-deriv committed Jan 11, 2023
1 parent e512bc8 commit cfbbf1b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const TradingDatePicker = ({
const getMinDuration = () => {
return hasIntradayDurationUnit(duration_units_list)
? toMoment(server_time).clone()
: toMoment(server_time).clone().add(duration_min_max.daily.min, 'second');
: toMoment(server_time).clone().add(duration_min_max?.daily?.min, 'second');
};

const getMomentContractStartDateTime = () => {
Expand Down

0 comments on commit cfbbf1b

Please sign in to comment.