A clean and minimal youtube frontend, without all the ads and whistles
JavaScript
fix: add Array.isArray check for videos in updateAndPersistVideos
Christian Feibbf794b8d907
diff --git a/index.js b/index.jsindex 74132ee..a3c08ff 100644--- a/index.js+++ b/index.js@@ -25,6 +25,7 @@ async function main ({ port = 3000 } = {}) {updateAndPersistVideos((err, data) => {if (err) return console.error(err)const { name, videos } = data+ if (!Array.isArray(videos)) return console.error(`Failed to fetch videos for ${name}`)const newVideos = videos.filter(v => v.addedAt > lastAdded).filter(v => !v.ignored)lastAdded = Date.now()if (newVideos.length > 0) {