Fix disaster waiting to happen

feature-show_image_resolution v0.1.1
neobooru 2019-09-19 23:25:56 +02:00
parent e2867bb3ff
commit 4b48e686bc
1 changed files with 5 additions and 5 deletions

View File

@ -11,12 +11,12 @@ async function grabPost(): Promise<ScrapedPost | null> {
console.log(`Using ${loaderName} importer to scrape this page`) console.log(`Using ${loaderName} importer to scrape this page`)
return await loader.grabPost(document); return await loader.grabPost(document);
} }
}
// Try using the Fallback loader if no other loader can scrape this page // Try using the Fallback loader if no other loader can scrape this page
const post = new loaders.Fallback().grabPost(document); const post = new loaders.Fallback().grabPost(document);
if (post) { if (post) {
return post; return post;
}
} }
return null; return null;