diff options
Diffstat (limited to 'client/src/assets/player/peertube-chunk-store.ts')
-rw-r--r-- | client/src/assets/player/peertube-chunk-store.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/client/src/assets/player/peertube-chunk-store.ts b/client/src/assets/player/peertube-chunk-store.ts index e14e31c04..767e46821 100644 --- a/client/src/assets/player/peertube-chunk-store.ts +++ b/client/src/assets/player/peertube-chunk-store.ts | |||
@@ -118,7 +118,13 @@ export class PeertubeChunkStore extends EventEmitter { | |||
118 | 118 | ||
119 | // IndexDB could be slow, use our memory index first | 119 | // IndexDB could be slow, use our memory index first |
120 | const memoryChunk = this.memoryChunks[index] | 120 | const memoryChunk = this.memoryChunks[index] |
121 | if (memoryChunk === undefined) return cb(null, new Buffer(0)) | 121 | if (memoryChunk === undefined) { |
122 | const err = new Error('Chunk not found') | ||
123 | err['notFound'] = true | ||
124 | |||
125 | return process.nextTick(() => cb(err)) | ||
126 | } | ||
127 | |||
122 | // Chunk in memory | 128 | // Chunk in memory |
123 | if (memoryChunk !== true) return cb(null, memoryChunk) | 129 | if (memoryChunk !== true) return cb(null, memoryChunk) |
124 | 130 | ||