SoftwareBrothers / adminjs-mongoose

Mongoose adapter for AdminJS
MIT License
14 stars 40 forks source link

fix: resolve nested array creation issue #116

Open erfanva opened 1 month ago

erfanva commented 1 month ago

Fixed an issue where nested arrays were incorrectly saved as objects during initial creation, resulting in an unexpected data structure. With this fix, nested arrays are now properly initialized and stored as arrays, aligning with expected behavior.

Example of the issue: Input: ['the', 'issue'] Saved in DB (before fix): { '0': 'the', '1': 'issue' }

Interestingly, this issue only occurred on record creation, while updating a record saved arrays correctly.