Skip to content

Commit

Permalink
path: use the correct name in validateString
Browse files Browse the repository at this point in the history
The parameter was renamed from `ext` to `suffix`
but not in the `validateString` call.

PR-URL: #53669
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Deokjin Kim <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
bpasero committed Jul 30, 2024
1 parent 4d1cc76 commit f9f9a42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/path.js
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ const win32 = {
*/
basename(path, suffix) {
if (suffix !== undefined)
validateString(suffix, 'ext');
validateString(suffix, 'suffix');
validateString(path, 'path');
let start = 0;
let end = -1;
Expand Down Expand Up @@ -1335,7 +1335,7 @@ const posix = {
*/
basename(path, suffix) {
if (suffix !== undefined)
validateString(suffix, 'ext');
validateString(suffix, 'suffix');
validateString(path, 'path');

let start = 0;
Expand Down

0 comments on commit f9f9a42

Please sign in to comment.