mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
Allow null context in Script
This commit is contained in:
1 parent
1a1214866f
commit
31b59400f8
2 files changed
+5
-1
No files matched your search
+1
-1
@@ -175,7 +175,7 @@ template <node::Script::EvalInputFlags iFlag,
|
||||
|
||||
Local<Object> sandbox;
|
||||
if (cFlag == newContext) {
|
||||
sandbox = args.Length() > sbIndex ? args[sbIndex]->ToObject() : Object::New();
|
||||
sandbox = args[sbIndex]->IsObject() ? args[sbIndex]->ToObject() : Object::New();
|
||||
} else if (cFlag == userContext) {
|
||||
sandbox = args[sbIndex]->ToObject();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user