diff --git a/src/disp.cpp b/src/disp.cpp index d46c04b..cd0737a 100644 --- a/src/disp.cpp +++ b/src/disp.cpp @@ -1112,12 +1112,18 @@ void VariantObject::NodeGet(Local name, const PropertyCallbackInfoGetter& if ((self->value.vt & VT_ARRAY) != 0) { args.GetReturnValue().Set((uint32_t)self->value.ArrayLength()); } - } + else { + args.GetReturnValue().SetUndefined(); + } + } else { Local func; if (clazz_methods.get(isolate, id, &func)) { args.GetReturnValue().Set(func); } + else { + args.GetReturnValue().SetUndefined(); + } } }