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 <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
  • Loading branch information
ddazal authored and BethGriggs committed Apr 27, 2020
1 parent 36a4f54 commit b957895
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 b957895

Please sign in to comment.