mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
refactor(FE): Fix null check for product_flag_mapping in ProductForm
This commit is contained in:
@@ -74,7 +74,7 @@ const ProductForm = ({ type = 'add', initialValues }: ProductFormProps) => {
|
||||
);
|
||||
|
||||
const productFlagMapping: ProductFlagMapping | null = useMemo(() => {
|
||||
if (constantsError || !constants) {
|
||||
if (constantsError || !constants?.product_flag_mapping) {
|
||||
return PRODUCT_FLAG_MAPPING as unknown as ProductFlagMapping;
|
||||
}
|
||||
return constants.product_flag_mapping;
|
||||
|
||||
Reference in New Issue
Block a user