From ba14f119493cddda9d48e9d9a9b5abc530d1fd5b Mon Sep 17 00:00:00 2001 From: eliot-akira Date: Tue, 12 Oct 2021 14:58:12 +0200 Subject: [PATCH] Add final new line to align behavior with Node.js version --- browser-version/lib/storage.js | 1 + 1 file changed, 1 insertion(+) diff --git a/browser-version/lib/storage.js b/browser-version/lib/storage.js index 180d7c9..7a5fdfc 100755 --- a/browser-version/lib/storage.js +++ b/browser-version/lib/storage.js @@ -69,6 +69,7 @@ const mkdir = (dir, options, callback) => callback() const ensureDatafileIntegrity = (filename, callback) => callback(null) const crashSafeWriteFileLines = (filename, lines, callback) => { + lines.push('') // Add final new line writeFile(filename, lines.join('\n'), callback) }