Skip to content

Commit 8ad0dff

Browse files
chirsz-evertargos
authored andcommitted
doc: fix the require resolve algorithm in modules.md
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>
1 parent a9675a0 commit 8ad0dff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/modules.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ NODE_MODULES_PATHS(START)
325325
2. let I = count of PARTS - 1
326326
3. let DIRS = []
327327
4. while I >= 0,
328-
a. if PARTS[I] = "node_modules" CONTINUE
328+
a. if PARTS[I] = "node_modules", GOTO d.
329329
b. DIR = path join(PARTS[0 .. I] + "node_modules")
330330
c. DIRS = DIR + DIRS
331331
d. let I = I - 1

0 commit comments

Comments
 (0)