aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--server/lib/files-cache/abstract-video-static-file-cache.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/files-cache/abstract-video-static-file-cache.ts b/server/lib/files-cache/abstract-video-static-file-cache.ts
index 1908cfb06..c06355446 100644
--- a/server/lib/files-cache/abstract-video-static-file-cache.ts
+++ b/server/lib/files-cache/abstract-video-static-file-cache.ts
@@ -18,8 +18,8 @@ export abstract class AbstractVideoStaticFileCache <T> {
18 maxAge, 18 maxAge,
19 max, 19 max,
20 promise: true, 20 promise: true,
21 dispose: (result: GetFilePathResult) => { 21 dispose: (result?: GetFilePathResult) => {
22 if (result.isOwned !== true) { 22 if (result && result.isOwned !== true) {
23 remove(result.path) 23 remove(result.path)
24 .then(() => logger.debug('%s removed from %s', result.path, this.constructor.name)) 24 .then(() => logger.debug('%s removed from %s', result.path, this.constructor.name))
25 .catch(err => logger.error('Cannot remove %s from cache %s.', result.path, this.constructor.name, { err })) 25 .catch(err => logger.error('Cannot remove %s from cache %s.', result.path, this.constructor.name, { err }))