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:
parent
5b7811ad01
commit
e1a21538a4
1 changed files with 1 additions and 1 deletions
|
@ -82,7 +82,7 @@ public:
|
||||||
this->handle = handle;
|
this->handle = handle;
|
||||||
}
|
}
|
||||||
virtual operator VALUE() const {
|
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 {
|
virtual operator v8::Handle<T>() const {
|
||||||
if (RTEST(this->value)) {
|
if (RTEST(this->value)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue