Skip to content

Commit

Permalink
Removed .? from the code
Browse files Browse the repository at this point in the history
  • Loading branch information
DawidKossowski committed Sep 22, 2023
1 parent 2fca617 commit 37d92de
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions packages/ckeditor5-ui/src/search/text/searchtextview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,21 @@ export default class SearchTextView<
let primaryText, secondaryText;

if ( data.totalItemsCount ) {
primaryText = defaultTextConfig?.notFound?.primary || t( 'No results found' );
secondaryText = defaultTextConfig?.notFound?.secondary || '';
if ( defaultTextConfig && defaultTextConfig.notFound ) {
primaryText = defaultTextConfig.notFound.primary;
secondaryText = defaultTextConfig.notFound.secondary;
} else {
primaryText = t( 'No results found' );
secondaryText = '';
}
} else {
primaryText = defaultTextConfig?.noSearchableItems?.primary || t( 'No searchable items' );
secondaryText = defaultTextConfig?.noSearchableItems?.secondary || '';
if ( defaultTextConfig && defaultTextConfig.noSearchableItems ) {
primaryText = defaultTextConfig.noSearchableItems.primary;
secondaryText = defaultTextConfig.noSearchableItems.secondary;
} else {
primaryText = t( 'No searchable items' );
secondaryText = '';
}
}

infoView.set( {
Expand Down

0 comments on commit 37d92de

Please sign in to comment.