Skip to content

Commit c27e977

Browse files
author
Mihail Slavchev
committed
bring back __extends to the module object
1 parent 6deaaf6 commit c27e977

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/jni/Module.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,8 @@ Local<Object> Module::LoadModule(Isolate *isolate, const string& modulePath)
270270
Local<Value> requireArgs[5] { moduleObj, exportsObj, require, fileName, dirName };
271271

272272
auto thiz = Object::New(isolate);
273+
auto extendsName = ConvertToV8String("__extends");
274+
thiz->Set(extendsName, isolate->GetCurrentContext()->Global()->Get(extendsName));
273275
moduleFunc->Call(thiz, sizeof(requireArgs) / sizeof(Local<Value>), requireArgs);
274276

275277
if(tc.HasCaught()) {

0 commit comments

Comments
 (0)