We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d628a61 commit 4f71c07Copy full SHA for 4f71c07
src/node_sqlite.cc
@@ -1763,13 +1763,9 @@ void DatabaseSync::ApplyChangeset(const FunctionCallbackInfo<Value>& args) {
1763
1764
Local<Function> filterFunc = filterValue.As<Function>();
1765
1766
- context.filterCallback =
1767
- [db, env, filterFunc](std::string_view item) -> bool {
+ context.filterCallback = [&](std::string_view item) -> bool {
1768
Local<Value> argv[1];
1769
- if (!String::NewFromUtf8(env->isolate(),
1770
- item.data(),
1771
- NewStringType::kNormal,
1772
- static_cast<int>(item.size()))
+ if (!ToV8Value(env->context(), item, env->isolate())
1773
.ToLocal(&argv[0])) {
1774
db->SetIgnoreNextSQLiteError(true);
1775
return false;
0 commit comments