@better-giving/endowment 4.0.26 → 4.0.27

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/dist/db.mjs CHANGED
@@ -56,6 +56,8 @@ export class NpoDb extends Db {
56
56
  };
57
57
  }
58
58
  async npos_get(ids, fields) {
59
+ if (ids.length === 0)
60
+ return [];
59
61
  const { names, expression } = projection(fields);
60
62
  const cmd = new BatchGetCommand({
61
63
  RequestItems: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-giving/endowment",
3
- "version": "4.0.26",
3
+ "version": "4.0.27",
4
4
  "dependencies": {
5
5
  "ksuid": "3.0.0"
6
6
  },
package/src/db.mts CHANGED
@@ -105,6 +105,7 @@ export class NpoDb extends Db {
105
105
  ids: number[],
106
106
  fields?: T
107
107
  ): Promise<TNpoDbProjectedTo<T>[]> {
108
+ if (ids.length === 0) return [];
108
109
  const { names, expression } = projection(fields);
109
110
  const cmd = new BatchGetCommand({
110
111
  RequestItems: {
package/src/schema.mts CHANGED
@@ -299,4 +299,4 @@ export const npos_search = v.object({
299
299
  });
300
300
 
301
301
  export interface INposSearch extends v.InferInput<typeof npos_search> {}
302
- export interface INposSearchObj extends v.InferOutput<typeof npos_search> {}
302
+ export interface INposSearchObj extends v.InferOutput<typeof npos_search> {}