Skip to content

Commit c34a747

Browse files
tniessenMylesBorins
authored andcommitted
doc: fix mistake in path.relative
The docs implied that the parameters `from` and `to` are invalid only if neither of them is a string; in fact, they are invalid as soon as one of them is not a string. PR-URL: #13912 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Cai <davidcai1993@yahoo.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
1 parent dc3d295 commit c34a747

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/path.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ path.relative('C:\\orandea\\test\\aaa', 'C:\\orandea\\impl\\bbb');
447447
// Returns: '..\\..\\impl\\bbb'
448448
```
449449

450-
A [`TypeError`][] is thrown if neither `from` nor `to` is a string.
450+
A [`TypeError`][] is thrown if either `from` or `to` is not a string.
451451

452452
## path.resolve([...paths])
453453
<!-- YAML

0 commit comments

Comments
 (0)