Skip to content

Commit 5ca4139

Browse files
committed
Fix uploading empty files
1 parent 2f6577e commit 5ca4139

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/app/src/app/overmind/namespaces/files/internalActions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export const uploadFiles: AsyncAction<
9999
file.type === 'application/json') &&
100100
dataURI.length < MAX_FILE_SIZE
101101
) {
102-
const text = atob(dataURI.replace(/^.*base64,/, ''));
102+
const text = dataURI ? atob(dataURI.replace(/^.*base64,/, '')) : '';
103103
parsedFiles[filePath] = {
104104
content: text,
105105
isBinary: false,

0 commit comments

Comments
 (0)