Skip to content

Commit

Permalink
fix(plugin-fm): set invalid when uploading is not completed to avoid …
Browse files Browse the repository at this point in the history
…submit (nocobase#4653)
  • Loading branch information
mytharcher authored Jun 13, 2024
1 parent 1d568c6 commit a38e4ad
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -345,11 +345,10 @@ export function Uploader({ rules, ...props }: UploadProps) {
const beforeUpload = useBeforeUpload(rules);

useEffect(() => {
const error = pendingList.find((file) => file.status === 'error');
if (error) {
if (pendingList.length) {
field.setFeedback({
type: 'error',
code: 'UploadError',
code: 'ValidateError',
messages: [t('Incomplete uploading files need to be resolved')],
});
} else {
Expand Down

0 comments on commit a38e4ad

Please sign in to comment.