From 7c052fedfc6db8536acb4afeb7177f51a7f90991 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Sat, 22 Aug 2020 00:28:22 +0200 Subject: [PATCH] Fixed map error. --- src/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.js b/src/app.js index e849fb89..3a45851a 100644 --- a/src/app.js +++ b/src/app.js @@ -40,7 +40,7 @@ async function init() { const sceneMovies = deepScenes && deepScenes.map(scene => scene.movie).filter(Boolean); const deepMovies = argv.sceneMovies && await fetchMovies([...(argv.movie || []), ...(sceneMovies || [])]); - const movieScenes = deepMovies.map(movie => movie.scenes.map(scene => ({ ...scene, entity: movie.entity }))).flat().filter(Boolean); + const movieScenes = deepMovies.map(movie => movie.scenes?.map(scene => ({ ...scene, entity: movie.entity }))).flat().filter(Boolean); const deepMovieScenes = argv.movieScenes ? await fetchScenes(movieScenes) : movieScenes; if (argv.inspect) {