File tree 2 files changed +10
-8
lines changed
2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -93,11 +93,12 @@ class ClientStepWorker : public Nan::AsyncWorker {
93
93
private:
94
94
virtual void HandleOKCallback () {
95
95
Nan::HandleScope scope;
96
- v8::Local<v8::Value> argv[] = {
97
- Nan::Null (),
98
- Nan::New (_client->_state ->response ).ToLocalChecked ()
99
- };
96
+ v8::Local<v8::Value> response = Nan::Null ();
97
+ if (_client-> _state -> response != NULL ) {
98
+ response = Nan::New (_client->_state ->response ).ToLocalChecked ();
99
+ }
100
100
101
+ v8::Local<v8::Value> argv[] = { Nan::Null (), response };
101
102
callback->Call (2 , argv, async_resource);
102
103
}
103
104
Original file line number Diff line number Diff line change @@ -93,11 +93,12 @@ class ServerStepWorker : public Nan::AsyncWorker {
93
93
private:
94
94
virtual void HandleOKCallback () {
95
95
Nan::HandleScope scope;
96
- v8::Local<v8::Value> argv[] = {
97
- Nan::Null (),
98
- Nan::New (_server->_state ->response ).ToLocalChecked ()
99
- };
96
+ v8::Local<v8::Value> response = Nan::Null ();
97
+ if (_server-> _state -> response != NULL ) {
98
+ response = Nan::New (_server->_state ->response ).ToLocalChecked ();
99
+ }
100
100
101
+ v8::Local<v8::Value> argv[] = { Nan::Null (), response };
101
102
callback->Call (2 , argv, async_resource);
102
103
}
103
104
You can’t perform that action at this time.
0 commit comments