1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00

Don't wrap an empty handle

This commit is contained in:
Charles Lowell 2012-05-25 12:58:32 -05:00
parent 5b7811ad01
commit e1a21538a4

View file

@ -82,7 +82,7 @@ public:
this->handle = handle;
}
virtual operator VALUE() const {
return (new Holder(handle, Class))->value;
return handle.IsEmpty() ? Qnil : (new Holder(handle, Class))->value;
}
virtual operator v8::Handle<T>() const {
if (RTEST(this->value)) {