diff --git a/changelog.md b/changelog.md index 0cc6a6b..277ab98 100644 --- a/changelog.md +++ b/changelog.md @@ -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 diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index c31afde..01f6684 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -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.' } diff --git a/ts/smartdata.classes.doc.ts b/ts/smartdata.classes.doc.ts index c83cb24..b0fc70a 100644 --- a/ts/smartdata.classes.doc.ts +++ b/ts/smartdata.classes.doc.ts @@ -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)) {