Skip to content

Commit 9f9069d

Browse files
authored
fs: fix linter issue
PR-URL: #55353 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
1 parent 7a3027d commit 9f9069d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/internal/fs/utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ const validatePath = hideStackFrames((path, propName = 'path', options) => {
723723

724724
const pathIsString = typeof path === 'string';
725725
const pathIsUint8Array = isUint8Array(path);
726-
if (options && options.expectFile) {
726+
if (options?.expectFile) {
727727
const lastCharacter = path[path.length - 1];
728728
if (
729729
lastCharacter === '/' || lastCharacter === 47 ||

test/sequential/test-fs-path-dir.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function checkPromiseFn(promiseFn, p, args, fail) {
7777
console.log(failMsg, err);
7878
throw err;
7979
});
80-
if (r && r.close) r.close();
80+
r?.close?.();
8181
} else {
8282
assert.rejects(
8383
promiseFn(p, ...args), {

0 commit comments

Comments
 (0)