Skip to content

Commit

Permalink
fix: filter out any undefined keypairs
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Pader committed Sep 13, 2023
1 parent 0f54a21 commit 2b7350a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/storage/providers/SQLiteStorage.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const provider = {
SET valueJSON = JSON_PATCH(valueJSON, JSON(:value));
`;

const queryArguments = _.map(pairs, pair => [pair[0], _.isUndefined(pair[1]) ? null : pair[1]]);
const queryArguments = _.filter(pairs, pair => !_.isUndefined(pair[1]));

return db.executeBatchAsync([[query, queryArguments]]);
},
Expand Down

0 comments on commit 2b7350a

Please sign in to comment.