From 0c3a1df90f7b973a93faba6fd9c0df69833afdc3 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Sat, 12 Feb 2022 03:12:00 +0300 Subject: [PATCH] Update index_category_m3u.js --- scripts/generators/index_category_m3u.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/generators/index_category_m3u.js b/scripts/generators/index_category_m3u.js index 1794f8733b..3ee1ce1562 100644 --- a/scripts/generators/index_category_m3u.js +++ b/scripts/generators/index_category_m3u.js @@ -13,11 +13,13 @@ module.exports = async function (streams = []) { return } - stream.categories.forEach(category => { - const item = _.cloneDeep(stream) - item.group_title = category.name - items.push(item) - }) + stream.categories + .filter(c => c) + .forEach(category => { + const item = _.cloneDeep(stream) + item.group_title = category.name + items.push(item) + }) }) items = _.sortBy(items, item => {