mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-27 11:18:14 +01:00 
			
		
		
		
	Fix: filter out invalid bookmarks
This commit is contained in:
		
							parent
							
								
									b6ae6d86fa
								
							
						
					
					
						commit
						7c1789a7c2
					
				| @ -22,7 +22,13 @@ class AudiobookProgress { | ||||
| 
 | ||||
|   bookmarksToJSON() { | ||||
|     if (!this.bookmarks) return [] | ||||
|     return this.bookmarks.map(b => b.toJSON()) | ||||
|     return this.bookmarks.filter((b) => { | ||||
|       if (!b.toJSON) { | ||||
|         Logger.error(`[AudiobookProgress] Invalid bookmark ${JSON.stringify(b)}`) | ||||
|         return false | ||||
|       } | ||||
|       return true | ||||
|     }).map(b => b.toJSON()) | ||||
|   } | ||||
| 
 | ||||
|   toJSON() { | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user