Skip to content

Commit 46c926c

Browse files
committed
fix bad check
1 parent 5e67257 commit 46c926c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ FileSystemAdapter.prototype.createFile = function (filename, data) {
3131
const stream = fs.createWriteStream(filepath);
3232
return new Promise((resolve, reject) => {
3333
try {
34-
const iv = this._encryptionKey !== null ? crypto.randomBytes(16) : null;
34+
const iv = this._encryptionKey ? crypto.randomBytes(16) : null;
3535

3636
const cipher =
37-
this._encryptionKey !== null && iv
38-
? crypto.createCipheriv(this._algorithm, this._encryptionKey, iv)
37+
this._encryptionKey && iv
38+
? crypto.createCipheriv(algorithm, this._encryptionKey, iv)
3939
: null;
4040

4141
// when working with a Blob, it could be over the max size of a buffer, so we need to stream it

0 commit comments

Comments
 (0)