mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
doc: fix the require resolve algorithm in modules.md
Before the fix, the pseudocode was describing an infinite loop. PR-URL: https://github.com/nodejs/node/pull/55117 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
This commit is contained in:
1 parent
f10d9ad283
commit
7a51a161be
1 file changed
+1
-1
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user