Skip to content

Commit

Permalink
doc: fix mistake in path.relative
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
tniessen authored and addaleax committed Jul 18, 2017
1 parent 0fc7a50 commit 9ff5212
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/path.md
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ path.relative('C:\\orandea\\test\\aaa', 'C:\\orandea\\impl\\bbb');
// Returns: '..\\..\\impl\\bbb'
```

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

## path.resolve([...paths])
<!-- YAML
Expand Down

0 comments on commit 9ff5212

Please sign in to comment.