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 <moshe@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
bpasero authored and targos committed Oct 2, 2024
1 parent c0b4c82 commit 329be5c
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 @@ -776,7 +776,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 @@ -1336,7 +1336,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 329be5c

Please sign in to comment.