mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 18:25:13 +08:00
lib: remove unnecesary else block
The if statement inside the _writeHostObject function returns an expression which makes the else block unnecessary. PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
1 parent
8a3fa32a1f
commit
83f7bb441f
1 file changed
+2
-3
@@ -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 });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user