1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Api: Fixes #2018: Fixed error handling when getting resources of a note that does not exist

This commit is contained in:
Laurent Cozic 2019-10-28 19:02:29 +00:00
parent 30969f8ab6
commit 7153c06e88

View File

@ -369,6 +369,7 @@ class Api {
return Tag.tagsByNoteId(id);
} else if (link && link === 'resources') {
const note = await Note.load(id);
if (!note) throw new ErrorNotFound();
const resourceIds = await Note.linkedResourceIds(note.body);
const output = [];
const loadOptions = this.defaultLoadOptions_(request);