Skip to content

Commit

Permalink
doc: fix the require resolve algorithm in modules.md
Browse files Browse the repository at this point in the history
Before the fix, the pseudocode was describing an infinite loop.

PR-URL: #55117
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Chemi Atlow <[email protected]>
  • Loading branch information
chirsz-ever authored and marco-ippolito committed Nov 17, 2024
1 parent f10d9ad commit 7a51a16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ NODE_MODULES_PATHS(START)
2. let I = count of PARTS - 1
3. let DIRS = []
4. while I >= 0,
a. if PARTS[I] = "node_modules" CONTINUE
a. if PARTS[I] = "node_modules", GOTO d.
b. DIR = path join(PARTS[0 .. I] + "node_modules")
c. DIRS = DIR + DIRS
d. let I = I - 1
Expand Down

0 comments on commit 7a51a16

Please sign in to comment.