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 Aug 14, 2024
1 parent 8b35f0e commit 267cd7f
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 267cd7f

Please sign in to comment.