Skip to content

Commit

Permalink
fs: remove unnecessary handle type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
pd4d10 committed May 3, 2021
1 parent 68e6673 commit 196ad53
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions lib/internal/fs/promises.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,6 @@ async function handleFdClose(fileOpPromise, closeFunc) {
}

async function fsCall(fn, handle, ...args) {
if (handle[kRefs] === undefined) {
throw new ERR_INVALID_ARG_TYPE('filehandle', 'FileHandle', handle);
}

if (handle.fd === -1) {
// eslint-disable-next-line no-restricted-syntax
const err = new Error('file closed');
Expand Down

0 comments on commit 196ad53

Please sign in to comment.