mirror of
https://github.com/strapi/strapi.git
synced 2025-09-17 12:27:33 +00:00
Chore: Bring back null value handling
This commit is contained in:
parent
3379b244fb
commit
51c32c4893
@ -1,7 +1,6 @@
|
|||||||
import React, { useMemo } from 'react';
|
import React, { useMemo } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { useIntl } from 'react-intl';
|
import { useIntl } from 'react-intl';
|
||||||
import { Typography } from '@strapi/design-system';
|
|
||||||
import { DynamicTable as Table, useStrapiApp } from '@strapi/helper-plugin';
|
import { DynamicTable as Table, useStrapiApp } from '@strapi/helper-plugin';
|
||||||
import { useSelector } from 'react-redux';
|
import { useSelector } from 'react-redux';
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useIntl } from 'react-intl';
|
import { useIntl } from 'react-intl';
|
||||||
|
import { Typography } from '@strapi/design-system';
|
||||||
|
|
||||||
import ReviewWorkflowsStage from '.';
|
import ReviewWorkflowsStage from '.';
|
||||||
import getTrad from '../../../../../../../admin/src/content-manager/utils/getTrad';
|
import getTrad from '../../../../../../../admin/src/content-manager/utils/getTrad';
|
||||||
@ -32,6 +33,12 @@ export default (layout) => {
|
|||||||
sortable: false,
|
sortable: false,
|
||||||
},
|
},
|
||||||
cellFormatter({ strapi_reviewWorkflows_stage }) {
|
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} />;
|
return <ReviewWorkflowsStage name={strapi_reviewWorkflows_stage.name} />;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user