1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

All: Moving sync target logic to SyncTarget classes

This commit is contained in:
Laurent Cozic
2017-11-24 18:59:16 +00:00
parent cc7cbc2ecf
commit 112609c5f1
17 changed files with 78 additions and 61 deletions

View File

@ -80,6 +80,14 @@ class MdToHtml {
this.loadedResources_[id] = {};
const resource = await Resource.load(id);
if (!resource) {
// Can happen for example if an image is attached to a note, but the resource hasn't
// been download from the sync target yet.
console.warn('Cannot load resource: ' + id);
return;
}
this.loadedResources_[id] = resource;
if (options.onResourceLoaded) options.onResourceLoaded();