mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-02-24 04:00:59 +01:00
core: don't return invalid dataurl if image doesn't exist
This commit is contained in:
committed by
Abdullah Atta
parent
e43740c6bc
commit
bc433c56ae
@@ -250,6 +250,8 @@ export default class Attachments extends Collection {
|
||||
outputType
|
||||
}
|
||||
);
|
||||
if (!data) return;
|
||||
|
||||
return outputType === "base64"
|
||||
? dataurl.fromObject({ type: attachment.metadata.type, data })
|
||||
: data;
|
||||
|
||||
Reference in New Issue
Block a user