@acodeninja/persist 3.0.0-next.4 → 3.0.0-next.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acodeninja/persist",
3
- "version": "3.0.0-next.4",
3
+ "version": "3.0.0-next.5",
4
4
  "description": "A JSON based data modelling and persistence module with alternate storage mechanisms.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -120,6 +120,10 @@ export default class StorageEngine {
120
120
  const currentModel = await this.get(model.id);
121
121
 
122
122
  await this._deleteModel(currentModel.id);
123
+
124
+ const currentIndex = this._getIndex(currentModel.constructor);
125
+
126
+ await this._putIndex(currentModel.constructor, _.omit(currentIndex, [currentModel.id]));
123
127
  }
124
128
 
125
129
  /**