appease the linting gods

This commit is contained in:
Jonathan Barrow
2023-09-26 16:08:42 -04:00
parent ad0c25f68b
commit e8235072ea

View File

@@ -332,7 +332,11 @@ async function runQuestions() {
options.fetcher = answers.fetcher; options.fetcher = answers.fetcher;
options.sourceId = answers.source; options.sourceId = answers.source;
const source = sources.find(({ id }) => id === answers.source)!; const source = sources.find(({ id }) => id === answers.source);
if (!source) {
throw new Error(`No source with ID ${answers.source} found`);
}
if (source.type === 'embed') { if (source.type === 'embed') {
const sourceAnswers = await prompt<EmbedSourceAnswers>([ const sourceAnswers = await prompt<EmbedSourceAnswers>([