From 807b9695d8582d2a4a28d93c3217da185e7269cb Mon Sep 17 00:00:00 2001 From: haxry Date: Sun, 15 Jun 2025 17:15:05 +0000 Subject: [PATCH] handle alredy pinned cid --- packages/utils/src/pins.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/utils/src/pins.ts b/packages/utils/src/pins.ts index 0d9095aba..40402db94 100644 --- a/packages/utils/src/pins.ts +++ b/packages/utils/src/pins.ts @@ -75,7 +75,8 @@ export class PinsImpl implements Pins { const pinKey = toDSKey(cid) if (await this.datastore.has(pinKey)) { - throw new Error('Already pinned') + yield cid + return } const depth = Math.round(options.depth ?? Infinity)