mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
src,sqlite: fix filterFunc dangling reference
PR-URL: https://github.com/nodejs/node/pull/62281 Reviewed-By: René <contact.9a5d6388@renegade334.me.uk> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
1 parent
b800c57fce
commit
ede52bc2dc
1 file changed
+2
-1
+2
-1
@@ -2157,7 +2157,8 @@ void DatabaseSync::ApplyChangeset(const FunctionCallbackInfo<Value>& args) {
|
||||
|
||||
Local<Function> filterFunc = filterValue.As<Function>();
|
||||
|
||||
context.filterCallback = [&](std::string_view item) -> bool {
|
||||
context.filterCallback =
|
||||
[env, db, filterFunc](std::string_view item) -> bool {
|
||||
// If there was an error in the previous call to the filter's
|
||||
// callback, we skip calling it again.
|
||||
if (db->ignore_next_sqlite_error_) {
|
||||
|
||||
Reference in new issue
Block a user