fs: remove unnecessary ?? operator
This was introduced in 57678e55817366c39a3a241f89949c8fbe8418bc With the `if` conditional around this statement, `options` will always be evaluated as truthy. That means that the nullish coalescing operator will always evaluate to the left side, make it unnecessary. PR-URL: https://github.com/nodejs/node/pull/43073 Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: LiviaMedeiros <livia@cirno.name> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
This commit is contained in:
parent
8a5657bf9b
commit
4a34ece28f
@ -528,7 +528,7 @@ async function read(handle, bufferOrParams, offset, length, position) {
|
||||
offset = 0,
|
||||
length = buffer.byteLength - offset,
|
||||
position = null
|
||||
} = offset ?? ObjectCreate(null));
|
||||
} = offset);
|
||||
}
|
||||
|
||||
if (offset == null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user