Skip to content

Commit 9ff5212

Browse files
tniessenaddaleax
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 <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: David Cai <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]>
1 parent 0fc7a50 commit 9ff5212

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/path.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ path.relative('C:\\orandea\\test\\aaa', 'C:\\orandea\\impl\\bbb');
466466
// Returns: '..\\..\\impl\\bbb'
467467
```
468468

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

471471
## path.resolve([...paths])
472472
<!-- YAML

0 commit comments

Comments
 (0)