Skip to content

Commit

Permalink
Don't crash in multilang edit from sort label
Browse files Browse the repository at this point in the history
  • Loading branch information
tiberiuichim committed Feb 11, 2025
1 parent ca2a0a6 commit 344999e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/SearchBlock/templates/schema.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { FormattedMessage } from 'react-intl';

function FilterSchema({ formData: _formData }) {
return {
title: 'Filter',
Expand Down Expand Up @@ -176,7 +178,11 @@ export const searchResultsSchemaEnhancer = ({ schema, formData }) => {
appName,
choices: appConfig.sortOptions.map((opt) => [
`${opt.value}|${opt.direction}`,
opt.name,
typeof opt.name === 'object' ? (
<FormattedMessage {...opt.name} />
) : (
opt.name
),
]),
};
}
Expand Down

0 comments on commit 344999e

Please sign in to comment.