Commit ef0a1753 authored by chenshouchao's avatar chenshouchao

feat: 解决validators为空时流程图渲染不出来的问题

parent c88a7696
...@@ -20,6 +20,7 @@ export const getCheckResult = ( ...@@ -20,6 +20,7 @@ export const getCheckResult = (
helperText = "该选项是必填项"; helperText = "该选项是必填项";
} }
} }
if (parameter?.validators) {
if (parameter.validators.length > 0) { if (parameter.validators.length > 0) {
parameter.validators.forEach((validator) => { parameter.validators.forEach((validator) => {
const reg = new RegExp(validator.regex); const reg = new RegExp(validator.regex);
...@@ -29,6 +30,7 @@ export const getCheckResult = ( ...@@ -29,6 +30,7 @@ export const getCheckResult = (
} }
}); });
} }
}
return { return {
error, error,
helperText, helperText,
......
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