Skip to content

Commit 408153e

Browse files
committed
src,sqlite: fix filterFunc dangling reference
1 parent 35fed19 commit 408153e

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
@@ -2157,7 +2157,7 @@ void DatabaseSync::ApplyChangeset(const FunctionCallbackInfo<Value>& args) {
21572157

21582158
Local<Function> filterFunc = filterValue.As<Function>();
21592159

2160-
context.filterCallback = [&](std::string_view item) -> bool {
2160+
context.filterCallback = [env, db, filterFunc](std::string_view item) -> bool {
21612161
// If there was an error in the previous call to the filter's
21622162
// callback, we skip calling it again.
21632163
if (db->ignore_next_sqlite_error_) {

0 commit comments

Comments
 (0)