Skip to content

Commit

Permalink
fix: don't anticipate i18n a11y object will be present
Browse files Browse the repository at this point in the history
I forgot users can provide their own i18n, in which case it can come to
TypeErrors. So I shouldn't count on the a11y always being there.

Relates to PS-21279.
  • Loading branch information
daelmaak committed Jul 2, 2024
1 parent b11f87c commit 6417fbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/emoji-mart/src/components/Picker/Picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@ export default class Picker extends Component {
width: this.props.dynamicWidth ? '100%' : lineWidth,
height: '100%',
}}
aria-label={I18n.a11y.available_emojis ?? 'Available emojis'}
aria-label={I18n.a11y?.available_emojis ?? 'Available emojis'}
>
{this.props.searchPosition == 'static' && this.renderSearch()}
{this.renderSearchResults()}
Expand Down

0 comments on commit 6417fbb

Please sign in to comment.