File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ void GZNode::Init(Local<Object> exports)
8585 GetMaterialScriptsMessage);
8686
8787 Local<Context> context = isolate->GetCurrentContext ();
88- exports->Set (context, class_name, tpl->GetFunction (context).ToLocalChecked ()).Check ();
88+ exports->Set (context, class_name, tpl->GetFunction (context).ToLocalChecked ()).ToChecked ();
8989}
9090
9191// ///////////////////////////////////////////////
@@ -136,7 +136,13 @@ void GZNode::SetConnected(const FunctionCallbackInfo<Value>& args)
136136 Isolate* isolate = args.GetIsolate ();
137137
138138 GZNode *obj = ObjectWrap::Unwrap<GZNode>(args.This ());
139+
140+ #if NODE_MAJOR_VERSION<=10
141+ Local<Context> context = isolate->GetCurrentContext ();
142+ bool value = args[0 ]->BooleanValue (context).ToChecked ();
143+ #else
139144 bool value = args[0 ]->BooleanValue (isolate);
145+ #endif
140146 obj->gzIface ->SetConnected (value);
141147
142148 return ;
You can’t perform that action at this time.
0 commit comments