diff --git a/native_mate/handle.h b/native_mate/handle.h index c5855f2f99b..60bd2348dd6 100644 --- a/native_mate/handle.h +++ b/native_mate/handle.h @@ -48,6 +48,10 @@ struct Converter > { static bool FromV8(v8::Isolate* isolate, v8::Local val, mate::Handle* out) { T* object = NULL; + if (val->IsNull() || val->IsUndefined()) { + *out = mate::Handle(); + return true; + } if (!Converter::FromV8(isolate, val, &object)) { return false; }