Skip to content

Commit

Permalink
fs: fix linter issue
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
aduh95 authored Oct 10, 2024
1 parent 7a3027d commit 9f9069d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/internal/fs/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ const validatePath = hideStackFrames((path, propName = 'path', options) => {

const pathIsString = typeof path === 'string';
const pathIsUint8Array = isUint8Array(path);
if (options && options.expectFile) {
if (options?.expectFile) {
const lastCharacter = path[path.length - 1];
if (
lastCharacter === '/' || lastCharacter === 47 ||
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-fs-path-dir.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function checkPromiseFn(promiseFn, p, args, fail) {
console.log(failMsg, err);
throw err;
});
if (r && r.close) r.close();
r?.close?.();
} else {
assert.rejects(
promiseFn(p, ...args), {
Expand Down

0 comments on commit 9f9069d

Please sign in to comment.