Skip to content

Commit

Permalink
lib: remove unnecesary else block
Browse files Browse the repository at this point in the history
The if statement inside the _writeHostObject function
returns an expression which makes the else block unnecessary.

PR-URL: #32644
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
  • Loading branch information
ddazal authored and BridgeAR committed Apr 28, 2020
1 parent 507240c commit 8a85afa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/internal/child_process/serialization.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}
}

Expand Down

0 comments on commit 8a85afa

Please sign in to comment.