From 148d7c8215cf6cfb722bb0d247e2290311460edd Mon Sep 17 00:00:00 2001 From: mehdi Date: Fri, 15 Oct 2021 11:28:10 +0200 Subject: [PATCH] fix error callbacks --- lib/storage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/storage.js b/lib/storage.js index 97cd0da..612c759 100755 --- a/lib/storage.js +++ b/lib/storage.js @@ -103,8 +103,8 @@ storage.crashSafeWriteFileLines = (filename, lines, callback = () => {}) => { readable.on('end', () => { stream.close(cb) }) - readable.on('error', () => cb) - stream.on('error', () => cb) + readable.on('error', cb) + stream.on('error', cb) } catch (err) { cb(err) }