mirror of
https://github.com/zadam/trilium.git
synced 2025-10-26 15:56:29 +01:00
defensive check, #1736
This commit is contained in:
@@ -106,7 +106,7 @@ function processContent(images, note, content) {
|
|||||||
for (const {src, dataUrl, imageId} of images) {
|
for (const {src, dataUrl, imageId} of images) {
|
||||||
const filename = path.basename(src);
|
const filename = path.basename(src);
|
||||||
|
|
||||||
if (!dataUrl.startsWith("data:image")) {
|
if (!dataUrl || !dataUrl.startsWith("data:image")) {
|
||||||
log.info("Image could not be recognized as data URL:", dataUrl.substr(0, Math.min(100, dataUrl.length)));
|
log.info("Image could not be recognized as data URL:", dataUrl.substr(0, Math.min(100, dataUrl.length)));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user