diff --git a/lib/storage/file.js b/lib/storage/file.js index c868d46a6..68ae2e8db 100644 --- a/lib/storage/file.js +++ b/lib/storage/file.js @@ -60,6 +60,7 @@ var channelExists = function (filepath, cb) { }; const destroyStream = function (stream) { + if (!stream) { return; } try { stream.close(); } catch (err) { console.error(err); } setTimeout(function () { try { stream.destroy(); } catch (err) { console.error(err); }