Skip to content

Commit

Permalink
doc: fix an error in resolution algorithm steps
Browse files Browse the repository at this point in the history
As it is, if `X begins with './' or '/' or '../'` (step 3), it reads
as if it were possible for the algorithm to do a node_modules lookup
(step 4). But that doesn't seem to reflect the actual logic.
  • Loading branch information
Alex Zherdev committed Oct 14, 2019
1 parent aca1c28 commit 1a141ba
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions doc/api/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ require(X) from module at path Y
3. If X begins with './' or '/' or '../'
a. LOAD_AS_FILE(Y + X)
b. LOAD_AS_DIRECTORY(Y + X)
c. THROW "not found"
4. LOAD_NODE_MODULES(X, dirname(Y))
5. THROW "not found"
Expand Down

0 comments on commit 1a141ba

Please sign in to comment.