rename shrink_story to filter_story because it cannot change the original story

This commit is contained in:
Luk 2024-05-01 13:56:00 +08:00
parent 4bcc4a732b
commit 7407ac47a2

View File

@ -339,13 +339,11 @@ module.exports = {
return 0 return 0
}, },
shrink_story (story) { filter_story (story) {
if (Array.isArray(story)) { if (Array.isArray(story)) {
story = story.filter(section => Object.values(section).some(val => val?.trim?.())) // (section.text || section.image || section.video)?.trim?.() return story.filter(section => Object.values(section).some(val => val?.trim?.())) // (section.text || section.image || section.video)?.trim?.()
return story
} else { } else {
story = [] return []
return story
} }
} }
} }