From bc549d00b685b208072a19308bdd128a418a67ce Mon Sep 17 00:00:00 2001 From: David Daza <03dazal@gmail.com> Date: Fri, 3 Apr 2020 12:53:55 -0500 Subject: [PATCH] lib: remove unnecesary else block The if statement inside the _writeHostObject function returns an expression which makes the else block unnecessary --- lib/internal/child_process/serialization.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/internal/child_process/serialization.js b/lib/internal/child_process/serialization.js index 9f03a8e8446c43..df8a6ca67236c5 100644 --- a/lib/internal/child_process/serialization.js +++ b/lib/internal/child_process/serialization.js @@ -25,10 +25,9 @@ class ChildProcessSerializer extends v8.DefaultSerializer { if (isArrayBufferView(object)) { this.writeUint32(kArrayBufferViewTag); return super._writeHostObject(object); - } else { - this.writeUint32(kNotArrayBufferViewTag); - this.writeValue({ ...object }); } + this.writeUint32(kNotArrayBufferViewTag); + this.writeValue({ ...object }); } }