mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:48:13 +08:00
chore: input-image 兼容返回字符串 0 的情况 (#3196)
This commit is contained in:
parent
e9a8de5dda
commit
43cad2da60
@ -790,7 +790,7 @@ export default class FileControl extends React.Component<FileProps, FileState> {
|
||||
onProgress
|
||||
)
|
||||
.then(ret => {
|
||||
if (ret.status || !ret.data) {
|
||||
if ((ret.status && (ret as any).status !== '0') || !ret.data) {
|
||||
throw new Error(ret.msg || __('File.errorRetry'));
|
||||
}
|
||||
|
||||
|
@ -1035,7 +1035,7 @@ export default class ImageControl extends React.Component<
|
||||
const __ = this.props.translate;
|
||||
this._send(file, this.props.receiver as string, {}, onProgress)
|
||||
.then((ret: Payload) => {
|
||||
if (ret.status) {
|
||||
if (ret.status && (ret as any).status !== '0') {
|
||||
throw new Error(ret.msg || __('File.errorRetry'));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user