@acodeninja/persist 3.0.0-next.25 → 3.0.0-next.26

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.25",
3
+ "version": "3.0.0-next.26",
4
4
  "description": "A JSON based data modelling and persistence module with alternate storage mechanisms.",
5
5
  "type": "module",
6
6
  "scripts": {
package/src/Connection.js CHANGED
@@ -291,16 +291,16 @@ export default class Connection {
291
291
  if (!modelsToDelete.includes(m.id)) modelsToDelete.push(m.id);
292
292
  modelsToProcess.push(m);
293
293
  } else {
294
- const modelConstructor = this.#getModelConstructorFromId(m.id);
294
+ const foundModelConstructor = this.#getModelConstructorFromId(m.id);
295
295
  m[linkName] = undefined;
296
296
  modelsToPut.push(m);
297
297
 
298
- indexActions[modelConstructor.name] = indexActions[modelConstructor.name] ?? [];
299
- indexActions[modelConstructor.name].push(['reindex', m]);
298
+ indexActions[foundModelConstructor.name] = indexActions[foundModelConstructor.name] ?? [];
299
+ indexActions[foundModelConstructor.name].push(['reindex', m]);
300
300
 
301
301
  if (m.constructor.searchProperties().length) {
302
- searchIndexActions[modelConstructor.name] = searchIndexActions[modelConstructor.name] ?? [];
303
- searchIndexActions[modelConstructor.name].push(['reindex', m]);
302
+ searchIndexActions[foundModelConstructor.name] = searchIndexActions[foundModelConstructor.name] ?? [];
303
+ searchIndexActions[foundModelConstructor.name].push(['reindex', m]);
304
304
  }
305
305
  }
306
306
  }),