From cdd4220cb926da7854ffb359ce97fc7e91f2a1a1 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Wed, 13 Jan 2021 15:43:53 +0100 Subject: [PATCH] Fixed release actor crash when no actors are present. --- src/actors.js | 2 +- src/store-releases.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/actors.js b/src/actors.js index 802b0065..f495d19b 100644 --- a/src/actors.js +++ b/src/actors.js @@ -861,7 +861,7 @@ async function associateActors(releases, batchId) { const baseActors = Object.values(baseActorsByReleaseId).flat(); if (baseActors.length === 0) { - return null; + return []; } const baseActorsBySlug = baseActors.reduce((acc, baseActor) => ({ diff --git a/src/store-releases.js b/src/store-releases.js index f46faf98..12ae6cc2 100644 --- a/src/store-releases.js +++ b/src/store-releases.js @@ -321,7 +321,7 @@ async function storeScenes(releases) { // media is more error-prone, associate separately await associateReleaseMedia(releasesWithId); - if (argv.sceneActors) { + if (argv.sceneActors && actors) { await scrapeActors(actors.map(actor => actor.name)); }