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 <duhamelantoine1995@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
  • Loading branch information
chirsz-ever authored and targos committed Oct 4, 2024
1 parent ba923f4 commit e7bdfaa
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 @@ -325,7 +325,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 e7bdfaa

Please sign in to comment.