dynamo-bao 0.1.7 → 0.1.8

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": "dynamo-bao",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Simple powerful data modeling primitives for DynamoDB in JavaScript.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -121,7 +121,7 @@ const MutationMethods = {
121
121
  );
122
122
 
123
123
  const item = await this.find(primaryId, { batchDelay: 0 });
124
- if (!item) {
124
+ if (!item.exists()) {
125
125
  throw new ItemNotFoundError("Item not found", primaryId);
126
126
  }
127
127
 
package/src/model.js CHANGED
@@ -600,7 +600,7 @@ class BaoModel {
600
600
 
601
601
  const item = await this.find(result.Item.relatedId, { loaderContext });
602
602
 
603
- if (item) {
603
+ if (item.exists()) {
604
604
  item._addConsumedCapacity(result.ConsumedCapacity, "read");
605
605
  }
606
606