Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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