Skip to content

Commit

Permalink
SandBox, bugfix: cannot find promises module by require("node:fs/prom…
Browse files Browse the repository at this point in the history
…ises") on Windows.
  • Loading branch information
xicilion committed Apr 12, 2023
1 parent a060c3e commit dbd3041
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fibjs/src/sandbox/SandBox.cpp
Expand Up @@ -126,7 +126,7 @@ result_t SandBox::addBuiltinModules()

v8::Local<v8::Value> promises = mod->Get(context, isolate->NewString("promises")).FromMaybe(v8::Local<v8::Value>());
if (!promises.IsEmpty() && promises->IsObject())
InstallModule("node:" + name + "/promises", promises.As<v8::Object>());
InstallModule("node:" + name + PATH_SLASH + "promises", promises.As<v8::Object>());

pModule = pModule->m_next;
}
Expand Down

0 comments on commit dbd3041

Please sign in to comment.