Improved handling of unavailable/deleted vidble videos

This commit is contained in:
ThePendulum 2018-06-07 14:55:16 +02:00
parent ec6182e747
commit 3a724d1b37
1 changed files with 4 additions and 0 deletions

View File

@ -18,6 +18,10 @@ function vidbleVideo(post) {
const source = resource.attr('src'); const source = resource.attr('src');
const type = resource.attr('type'); const type = resource.attr('type');
if(!source || !type) {
throw new Error(`Failed to retrieve (likely removed) vidble video '${post.host.id}'`);
}
return { return {
album: null, album: null,
items: [{ items: [{