Commit 5c7de3da by Konstantin Käfer

fix random "Use the new operator to create new Database objects" message

parent 04b72695
......@@ -101,7 +101,7 @@ void Database::Schedule(EIO_Callback callback, Baton* baton, bool exclusive) {
Handle<Value> Database::New(const Arguments& args) {
HandleScope scope;
if (!args.IsConstructCall()) {
if (!Database::HasInstance(args.This())) {
return ThrowException(Exception::TypeError(
String::New("Use the new operator to create new Database objects"))
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment