Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup: mention esm explictly
  • Loading branch information
BridgeAR committed Dec 9, 2019
commit aa2f0bff6332d744c885f644f6adc54491bb6ae4
4 changes: 2 additions & 2 deletions src/node_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ static void GetProxyDetails(const FunctionCallbackInfo<Value>& args) {
Local<Proxy> proxy = args[0].As<Proxy>();

// TODO(BridgeAR): Remove the length check as soon as we prohibit access to
// the util binding layer. It's accessed in the wild and some code would break
// in case the check is removed.
// the util binding layer. It's accessed in the wild and `esm` would break in
// case the check is removed.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an issue opened in esm? (BTW it is somewhat ambiguous what esm means here..unless it's explicitly pointed out that this is about the npm package)

if (args.Length() == 1 || args[1]->IsTrue()) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The length check here doesn’t change behaviour and could safely be dropped, so you can apply the TODO comment right now if you want.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean if I write if (!args[1]->IsFalse()) { ...old behavior... } else { ...new behavior... }?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, something like that … feel free to ignore though :)

Local<Value> ret[] = {
proxy->GetTarget(),
Expand Down