Commit 057acd94 by zhaochengxiang

bug fix

parent ebc0a272
......@@ -263,7 +263,7 @@ const ImportAction = React.forwardRef((props, ref) => {
},
error: () => {
form.setFieldsValue({
form?.setFieldsValue({
easyDataModelerModelingTemplate: modelerDataRef.current.easyDataModelerModelingTemplate,
tableType: modelerDataRef.current.tableType
});
......@@ -339,7 +339,7 @@ const ImportAction = React.forwardRef((props, ref) => {
getSupportedIndextypes();
if (newModelerData) {
form.setFieldsValue({
form?.setFieldsValue({
cnName: newModelerData.cnName||'',
name: newModelerData.name||'',
remark: newModelerData.remark||'',
......@@ -367,7 +367,7 @@ const ImportAction = React.forwardRef((props, ref) => {
const index = (constraints??[]).findIndex(item => item.id === value)
if (index !== -1) {
currentConstraint = constraints[index]
form.setFieldsValue({
form?.setFieldsValue({
easyDataModelerModelingConstraint: currentConstraint
});
const newModelerData = {...modelerData, easyDataModelerModelingConstraint: currentConstraint };
......@@ -513,13 +513,12 @@ const ImportAction = React.forwardRef((props, ref) => {
}
const validateDataModel = (data) => {
const row = form.getFieldsValue();
const row = form?.getFieldsValue();
dispatch({
type: 'datamodel.validateDataModel',
payload: {
data: (action==='detail'||action==='flow'||action==='detail-version')?data:{ ...data, ...{ name: row.name||'', cnName: row.cnName||'' } },
data: (action==='detail'||action==='flow'||action==='detail-version')?data:{ ...data, ...{ name: row?.name||'', cnName: row?.cnName||'' } },
},
callback: _data => {
setValidateReports(_data||[]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment