Compare commits

..

2 Commits

Author SHA1 Message Date
b3e30a8711 5.2.8 2024-09-05 13:45:56 +02:00
64621dd38f fix(smartdata.classes.doc): Fix key handling in convertFilterForMongoDb function 2024-09-05 13:45:55 +02:00
4 changed files with 8 additions and 4 deletions

View File

@ -1,5 +1,10 @@
# Changelog
## 2024-09-05 - 5.2.8 - fix(smartdata.classes.doc)
Fix key handling in convertFilterForMongoDb function
- Fixed an issue in convertFilterForMongoDb that allowed keys with dots which could cause errors.
## 2024-09-05 - 5.2.7 - fix(core)
Fixed issue with handling filter keys containing dots in smartdata.classes.doc.ts

View File

@ -1,6 +1,6 @@
{
"name": "@push.rocks/smartdata",
"version": "5.2.7",
"version": "5.2.8",
"private": false,
"description": "An advanced library for NoSQL data organization and manipulation using TypeScript with support for MongoDB, data validation, collections, and custom data types.",
"main": "dist_ts/index.js",

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartdata',
version: '5.2.7',
version: '5.2.8',
description: 'An advanced library for NoSQL data organization and manipulation using TypeScript with support for MongoDB, data validation, collections, and custom data types.'
}

View File

@ -60,8 +60,7 @@ export const convertFilterForMongoDb = (filterArg: { [key: string]: any }) => {
convertedFilter[keyPathArg2] = filterArg2;
return;
} else if (key.includes('.')) {
convertedFilter[keyPathArg2] = filterArg2;
return;
throw new Error('keys cannot contain dots');
}
}
for (const key of Object.keys(filterArg2)) {