@better-giving/fundraiser 3.0.26 → 3.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
@@ -50,6 +50,8 @@ export class FundDb extends Db {
50
50
  return item && this.sans_keys(item);
51
51
  }
52
52
  async funds_get(ids) {
53
+ if (ids.length === 0)
54
+ return [];
53
55
  const cmd = new BatchGetCommand({
54
56
  RequestItems: {
55
57
  [FundDb.table]: { Keys: ids.map((id) => this.key_fund(id)) },
@@ -1,6 +1,6 @@
1
1
  import type { DonateMethodId, Environment } from "@better-giving/schemas";
2
- import type { IFundNew } from "./schema.mjs";
3
2
  import type { IPageNumbered } from "@better-giving/types/api";
3
+ import type { IFundNew } from "./schema.mjs";
4
4
  export interface IFundSettings {
5
5
  hide_bg_tip: boolean;
6
6
  donateMethods?: DonateMethodId[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-giving/fundraiser",
3
- "version": "3.0.26",
3
+ "version": "3.0.27",
4
4
  "peerDependencies": {
5
5
  "valibot": "0.42.0",
6
6
  "@better-giving/schemas": "2.0.1",
package/src/db.mts CHANGED
@@ -63,6 +63,7 @@ export class FundDb extends Db {
63
63
  }
64
64
 
65
65
  async funds_get(ids: string[]): Promise<IFund[]> {
66
+ if (ids.length === 0) return [];
66
67
  const cmd = new BatchGetCommand({
67
68
  RequestItems: {
68
69
  [FundDb.table]: { Keys: ids.map((id) => this.key_fund(id)) },
@@ -1,6 +1,6 @@
1
1
  import type { DonateMethodId, Environment } from "@better-giving/schemas";
2
- import type { IFundNew } from "./schema.mjs";
3
2
  import type { IPageNumbered } from "@better-giving/types/api";
3
+ import type { IFundNew } from "./schema.mjs";
4
4
 
5
5
  export interface IFundSettings {
6
6
  hide_bg_tip: boolean;