This is an automated email from the ASF dual-hosted git repository.

suyanhanx pushed a commit to branch nodejs-stream
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git

commit 4a0b94e46de2d2b21caf50004d4cef8ce4c5a923
Author: suyanhanx <[email protected]>
AuthorDate: Sun Nov 19 01:02:40 2023 +0800

    polish
    
    Signed-off-by: suyanhanx <[email protected]>
---
 bindings/nodejs/index.js | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/bindings/nodejs/index.js b/bindings/nodejs/index.js
index c60016a08..8778e27bd 100644
--- a/bindings/nodejs/index.js
+++ b/bindings/nodejs/index.js
@@ -29,16 +29,12 @@ class WriterStream extends Writable {
 
   _write(chunk, encoding, callback) {
     this.writer.write(chunk)
-    if (typeof callback === 'function') {
-      callback()
-    }
+    callback()
   }
 
   _final(callback) {
     this.writer.close()
-    if (typeof callback === 'function') {
-      callback()
-    }
+    callback()
   }
 }
 

Reply via email to