Skip to content

Commit 140ef89

Browse files
author
Nako Sung
committed
added search for local node_modules
1 parent fecbbfb commit 140ef89

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Plugins/UnrealJS/Source/V8/Private/JavascriptContext_Private.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,11 +1313,14 @@ class FJavascriptContextImplementation : public FJavascriptContext
13131313
#endif
13141314
if (!(required_module[0] == '.' && inner2(current_script_path)))
13151315
{
1316-
for (const auto& path : Self->Paths)
1316+
if (!inner2(current_script_path / TEXT("node_modules")))
13171317
{
1318-
if (inner2(path)) break;
1318+
for (const auto& path : Self->Paths)
1319+
{
1320+
if (inner2(path)) break;
13191321

1320-
if (inner2(path / TEXT("node_modules"))) break;
1322+
if (inner2(path / TEXT("node_modules"))) break;
1323+
}
13211324
}
13221325
}
13231326

0 commit comments

Comments
 (0)