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 <[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 dc3d295 commit c34a747

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
@@ -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)