Skip to content

Commit d958277

Browse files
committed
fix value is null
1 parent 712ce59 commit d958277

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/libs/prepareRequestPayload/index.native.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,14 @@ const prepareRequestPayload: PrepareRequestPayload = (command, data, initiatedOf
1818
return Promise.resolve();
1919
}
2020

21-
const {uri: path = '', source} = value as File;
22-
if ((key === 'receipt' || key === 'file') && !!source && initiatedOffline) {
23-
21+
if ((key === 'receipt' || key === 'file') && initiatedOffline) {
22+
const {uri: path = '', source} = value as File;
23+
if (!source) {
24+
validateFormDataParameter(command, key, value);
25+
formData.append(key, value as string | Blob);
26+
27+
return Promise.resolve();
28+
}
2429
return readFileAsync(source, path, () => {}).then((file) => {
2530
if (!file) {
2631
return;

0 commit comments

Comments
 (0)