Chore: Bring back null value handling

This commit is contained in:
Gustav Hansen 2023-04-13 11:59:31 +02:00
parent 3379b244fb
commit 51c32c4893
2 changed files with 7 additions and 1 deletions

View File

@ -1,7 +1,6 @@
import React, { useMemo } from 'react';
import PropTypes from 'prop-types';
import { useIntl } from 'react-intl';
import { Typography } from '@strapi/design-system';
import { DynamicTable as Table, useStrapiApp } from '@strapi/helper-plugin';
import { useSelector } from 'react-redux';

View File

@ -1,5 +1,6 @@
import React from 'react';
import { useIntl } from 'react-intl';
import { Typography } from '@strapi/design-system';
import ReviewWorkflowsStage from '.';
import getTrad from '../../../../../../../admin/src/content-manager/utils/getTrad';
@ -32,6 +33,12 @@ export default (layout) => {
sortable: false,
},
cellFormatter({ strapi_reviewWorkflows_stage }) {
// if entities are created e.g. through lifecycle methods
// they may not have a stage assigned
if (!strapi_reviewWorkflows_stage) {
return <Typography textColor="neutral800">-</Typography>;
}
return <ReviewWorkflowsStage name={strapi_reviewWorkflows_stage.name} />;
},
};