Skip to content

Commit 785b07a

Browse files
committed
Resolve false for isFilePromise if stats is undefined
1 parent 196b074 commit 785b07a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/utils/base64.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ const isFilePromise = (file: string | Buffer): Promise<boolean> =>
99
if (err) {
1010
reject(err);
1111
}
12+
if (stats == undefined) {
13+
resolve(false);
14+
}
1215
resolve(stats.isFile());
1316
});
1417
});

0 commit comments

Comments
 (0)