Skip to content

Commit

Permalink
fix: use Get when indexing Napi::Array
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Dec 20, 2020
1 parent df97f87 commit ca2762e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/fuzzaldrin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Napi::Value Fuzzaldrin::setArrayFiltererCandidates(const Napi::CallbackInfo &inf
chunk_size++;
}
for (auto j = cur_start; j < cur_start + chunk_size; j++) {
candidates_[i].emplace_back(static_cast<Napi::Value>(candidates[j]).ToString().Utf8Value());
candidates_[i].emplace_back(candidates.Get(j).ToString().Utf8Value());
}
cur_start += chunk_size;
}
Expand Down
2 changes: 1 addition & 1 deletion src/tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct Tree {
const auto entriesArrayLength = jsTreeArray.Length();
entriesArray.reserve(entriesArrayLength); // reserve enough space
for (auto iEntry = 0u; iEntry < entriesArrayLength; iEntry++) {
makeEntriesArray(jsTreeArray[iEntry].As<Napi::Object>(), level, iEntry);
makeEntriesArray(jsTreeArray.Get(iEntry).As<Napi::Object>(), level, iEntry);
}
}

Expand Down

0 comments on commit ca2762e

Please sign in to comment.