Skip to content

Commit

Permalink
ADA-1062 - Change the value in condition to a specific key
Browse files Browse the repository at this point in the history
  • Loading branch information
tanasediana committed Jul 8, 2024
1 parent e405f26 commit e212286
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/captions-menu/captions-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class CaptionsMenu extends Component<any, any> {
.sort((a, b) => (a.label > b.label || a.label === 'Off' ? 1 : -1));

if (props.showAdvancedCaptionsMenu) {
textOptions.push({label: props.advancedCaptionsSettingsText, value: props.advancedCaptionsSettingsText, active: false});
textOptions.push({label: props.advancedCaptionsSettingsText, value: props.advancedCaptionsSettingsText, active: false, key: 'adv_captions'});
}

if (this.props.asDropdown) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/menu/menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ class MenuItem extends Component<any, any> {
render(props: any): VNode<any> {
const badgeType: string | null =
props.data.badgeType && !props.isSelected(props.data) ? BadgeType[props.data.badgeType] : BadgeType[props.data.badgeType + 'Active'];
const isAdvanced = props.data.value == "Advanced captions settings" ? true : false;
const isAdvanced = props?.data?.key == "adv_captions" ? true : false;
return (
<div
role={isAdvanced ? "menuitem" : "menuitemradio"}
Expand Down

0 comments on commit e212286

Please sign in to comment.