cry-synced-db-client 0.1.97 → 0.1.98

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.
Files changed (2) hide show
  1. package/dist/index.js +4 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3682,6 +3682,10 @@ var SyncedDb = class _SyncedDb {
3682
3682
  if ((_a = this.collections.get(collection)) == null ? void 0 : _a.writeOnly) {
3683
3683
  return this.writeOnlyFindById(collection, id);
3684
3684
  }
3685
+ if (!(opts == null ? void 0 : opts.returnDeleted) && !(opts == null ? void 0 : opts.returnArchived)) {
3686
+ const memItem = this.inMemDb.getById(collection, id);
3687
+ if (memItem) return memItem;
3688
+ }
3685
3689
  if (((opts == null ? void 0 : opts.returnDeleted) || (opts == null ? void 0 : opts.returnArchived)) && this.isOnline()) {
3686
3690
  try {
3687
3691
  const serverItem = await this.connectionManager.withRestTimeout(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cry-synced-db-client",
3
- "version": "0.1.97",
3
+ "version": "0.1.98",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",