Skip to content

Commit

Permalink
fix(search): block error when using item and card listing
Browse files Browse the repository at this point in the history
- the cards models are not taken into consideration on the
  listings but at lease we avoid a hard error
  • Loading branch information
ichim-david committed Oct 7, 2022
1 parent 36ef986 commit 1d80466
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/UniversalCard/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ const CardSchema = ({ formData }) => {

export default function universalCardSchemaEnhancer(props) {
const { schema } = props;
props.formData = props.formData || props.data;
const enhancer = schemaEnhancerFactory({
extensionName: 'cardTemplates',
messages,
Expand Down
1 change: 1 addition & 0 deletions src/components/UniversalItem/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ const ItemSchema = ({ formData }) => {

export default function universalItemSchemaEnhancer(props) {
const { schema } = props;
props.formData = props.formData || props.data;

const enhanceItemModel = schemaEnhancerFactory({
extensionName: 'itemTemplates',
Expand Down

0 comments on commit 1d80466

Please sign in to comment.