rename shrink_story to filter_story because it cannot change the original story
				
					
				
			This commit is contained in:
		
							parent
							
								
									4bcc4a732b
								
							
						
					
					
						commit
						7407ac47a2
					
				@ -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
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user