Skip to content

Commit d3cd3b4

Browse files
committed
fix: iterableIteratorTemplate->Set(v8::Symbol::GetIterator(isolate)
need a FunctionTemplate, not a Function.
1 parent 7a5eb74 commit d3cd3b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node_sqlite.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ void StatementSync::Iterate(const FunctionCallbackInfo<Value>& args) {
545545

546546
v8::Local<v8::FunctionTemplate> iteratorFuncTemplate = v8::FunctionTemplate::New(isolate, IteratorFunc);
547547
iterableIteratorTemplate->Set(String::NewFromUtf8Literal(isolate, "next"), nextFuncTemplate);
548-
iterableIteratorTemplate->Set(v8::Symbol::GetIterator(isolate), iteratorFuncTemplate->GetFunction(context).ToLocalChecked());
548+
iterableIteratorTemplate->Set(v8::Symbol::GetIterator(isolate), iteratorFuncTemplate);
549549

550550
v8::Local<v8::Value> iteratorPrototype = context->Global()->Get(context, String::NewFromUtf8Literal(isolate, "Iterator.prototype")).ToLocalChecked();
551551
v8::Local<v8::Object> iterableIterator = iterableIteratorTemplate->NewInstance(context).ToLocalChecked();

0 commit comments

Comments
 (0)