Skip to content

Commit 7a51a16

Browse files
chirsz-evermarco-ippolito
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 <[email protected]> Reviewed-By: Chemi Atlow <[email protected]>
1 parent f10d9ad commit 7a51a16

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
@@ -302,7 +302,7 @@ NODE_MODULES_PATHS(START)
302302
2. let I = count of PARTS - 1
303303
3. let DIRS = []
304304
4. while I >= 0,
305-
a. if PARTS[I] = "node_modules" CONTINUE
305+
a. if PARTS[I] = "node_modules", GOTO d.
306306
b. DIR = path join(PARTS[0 .. I] + "node_modules")
307307
c. DIRS = DIR + DIRS
308308
d. let I = I - 1

0 commit comments

Comments
 (0)