| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d3c0f46 commit 7a855f5
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -91,11 +91,12 @@ static void GetProxyDetails(const FunctionCallbackInfo<Value>& args) { | |||
| 91 | 91 | if (!args[0]->IsProxy()) | |
| 92 | 92 | return; | |
| 93 | 93 | ||
| 94 | - CHECK(args[1]->IsBoolean()); | ||
| 95 | - | ||
| 96 | 94 | Local<Proxy> proxy = args[0].As<Proxy>(); | |
| 97 | 95 | ||
| 98 | - if (args[1]->IsTrue()) { | ||
| 96 | + // TODO(BridgeAR): Remove the length check as soon as we prohibit access to | ||
| 97 | + // the util binding layer. It's accessed in the wild and `esm` would break in | ||
| 98 | + // case the check is removed. | ||
| 99 | + if (args.Length() == 1 || args[1]->IsTrue()) { | ||
| 99 | 100 | Local<Value> ret[] = { | |
| 100 | 101 | proxy->GetTarget(), | |
| 101 | 102 | proxy->GetHandler() | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -50,6 +50,10 @@ let details = processUtil.getProxyDetails(proxyObj, true); | |||
| 50 | 50 | assert.strictEqual(target, details[0]); | |
| 51 | 51 | assert.strictEqual(handler, details[1]); | |
| 52 | 52 | ||
| 53 | + details = processUtil.getProxyDetails(proxyObj); | ||
| 54 | + assert.strictEqual(target, details[0]); | ||
| 55 | + assert.strictEqual(handler, details[1]); | ||
| 56 | + | ||
| 53 | 57 | details = processUtil.getProxyDetails(proxyObj, false); | |
| 54 | 58 | assert.strictEqual(target, details); | |
| 55 | 59 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments