Skip to content

Commit

Permalink
fix: fix validator notify error message of Antd Upload Item (#2433)
Browse files Browse the repository at this point in the history
* fix: antd upload item error message

* fix: fusion upload item error message
  • Loading branch information
jz3567 authored Nov 15, 2021
1 parent 3562ac6 commit 8e4a6a9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
8 changes: 5 additions & 3 deletions packages/antd/src/upload/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,11 @@ const getErrorMessage = (target: any) => {
target?.errMsg ||
target?.errorMsg ||
target?.message ||
typeof target?.error === 'string'
? target.error
: ''
(
typeof target?.error === 'string'
? target.error
: ''
)
}

const getState = (target: any) => {
Expand Down
8 changes: 4 additions & 4 deletions packages/next/src/upload/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ const getSuccess = (target: any) => {
}

const getErrorMessage = (target: any) => {
return target?.errorMessage ||
return (
target?.errorMessage ||
target?.errMsg ||
target?.errorMsg ||
target?.message ||
typeof target?.error === 'string'
? target.error
: ''
(typeof target?.error === 'string' ? target.error : '')
)
}

const getState = (target: any) => {
Expand Down

0 comments on commit 8e4a6a9

Please sign in to comment.