fix(smartdata.classes.doc): Fix key handling in convertFilterForMongoDb function
This commit is contained in:
parent
117c257a27
commit
64621dd38f
@ -1,5 +1,10 @@
|
|||||||
# Changelog
|
# 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)
|
## 2024-09-05 - 5.2.7 - fix(core)
|
||||||
Fixed issue with handling filter keys containing dots in smartdata.classes.doc.ts
|
Fixed issue with handling filter keys containing dots in smartdata.classes.doc.ts
|
||||||
|
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@push.rocks/smartdata',
|
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.'
|
description: 'An advanced library for NoSQL data organization and manipulation using TypeScript with support for MongoDB, data validation, collections, and custom data types.'
|
||||||
}
|
}
|
||||||
|
@ -60,8 +60,7 @@ export const convertFilterForMongoDb = (filterArg: { [key: string]: any }) => {
|
|||||||
convertedFilter[keyPathArg2] = filterArg2;
|
convertedFilter[keyPathArg2] = filterArg2;
|
||||||
return;
|
return;
|
||||||
} else if (key.includes('.')) {
|
} else if (key.includes('.')) {
|
||||||
convertedFilter[keyPathArg2] = filterArg2;
|
throw new Error('keys cannot contain dots');
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (const key of Object.keys(filterArg2)) {
|
for (const key of Object.keys(filterArg2)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user