Skip to content

Commit

Permalink
chore: get Iterator from global instead global globalThis
Browse files Browse the repository at this point in the history
  • Loading branch information
tpoisseau committed Aug 26, 2024
1 parent e2a16a4 commit cd209b8
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/node_sqlite.cc
Original file line number Diff line number Diff line change
Expand Up @@ -619,13 +619,8 @@ void StatementSync::Iterate(const FunctionCallbackInfo<Value>& args) {
LocalVector<Value> values(isolate, {next_func, return_func});

Local<Object> global = context->Global();
Local<Object> js_global_this =
global->Get(context, String::NewFromUtf8Literal(isolate, "globalThis"))
.ToLocalChecked()
.As<Object>();
Local<Object> js_iterator =
js_global_this
->Get(context, String::NewFromUtf8Literal(isolate, "Iterator"))
global->Get(context, String::NewFromUtf8Literal(isolate, "Iterator"))
.ToLocalChecked()
.As<Object>();
Local<Object> js_iterator_prototype =
Expand Down

0 comments on commit cd209b8

Please sign in to comment.