mirror of
				https://github.com/TeamPiped/Piped.git
				synced 2025-10-31 12:42:07 +00:00 
			
		
		
		
	Merge pull request #2087 from TeamPiped/fix-npe-sponsorblock
Fix npe when there are no segments in a video.
This commit is contained in:
		| @@ -383,7 +383,7 @@ export default { | ||||
|             }); | ||||
|  | ||||
|             const minSegmentLength = Math.max(this.getPreferenceNumber("minSegmentLength", 0), 0); | ||||
|             sponsors.segments = sponsors.segments.filter(segment => { | ||||
|             sponsors.segments = sponsors.segments?.filter(segment => { | ||||
|                 const length = segment.segment[1] - segment.segment[0]; | ||||
|                 return length >= minSegmentLength; | ||||
|             }); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Kavin
					Kavin