File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -212,9 +212,11 @@ namespace OZW {
212212 ::std::string option_overrides;
213213 bool log_initialisation = true ;
214214 // Options are global for all drivers and can only be set once.
215- if (info.Length () > 0 ) {
215+ if (info.Length () > 0 && !info[ 0 ]-> IsUndefined () ) {
216216 Local < Object > opts = Nan::To<Object>(info[0 ]).ToLocalChecked ();
217- Local < Array > props = Nan::GetOwnPropertyNames (opts).ToLocalChecked ();
217+ MaybeLocal <v8::Array> propsmaybe = Nan::GetOwnPropertyNames (opts);
218+ if (propsmaybe.IsUndefined ()) return ;
219+ Local < Array > props = propsmaybe.ToLocalChecked ();
218220 for (unsigned int i = 0 ; i < props->Length (); ++i) {
219221 Local<Value> key = props->Get (i);
220222 ::std::string keyname = *Nan::Utf8String (key);
You can’t perform that action at this time.
0 commit comments