From 8d3de80e1e4be39d6fba4b6ba00a2ecd3af60ad8 Mon Sep 17 00:00:00 2001 From: Kieran Date: Fri, 25 Oct 2024 18:04:20 +0100 Subject: [PATCH] fix: relays tag missing --- packages/system-react/package.json | 4 ++-- packages/system/package.json | 2 +- packages/system/src/note-collection.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/system-react/package.json b/packages/system-react/package.json index 7469ccc0..45845e53 100644 --- a/packages/system-react/package.json +++ b/packages/system-react/package.json @@ -1,6 +1,6 @@ { "name": "@snort/system-react", - "version": "1.5.1", + "version": "1.5.3", "description": "React hooks for @snort/system", "main": "dist/index.js", "module": "src/index.ts", @@ -17,7 +17,7 @@ ], "dependencies": { "@snort/shared": "^1.0.17", - "@snort/system": "^1.5.1", + "@snort/system": "^1.5.3", "react": "^18.2.0" }, "devDependencies": { diff --git a/packages/system/package.json b/packages/system/package.json index 593a244a..53b573bd 100644 --- a/packages/system/package.json +++ b/packages/system/package.json @@ -1,6 +1,6 @@ { "name": "@snort/system", - "version": "1.5.2", + "version": "1.5.3", "description": "Snort nostr system package", "type": "module", "main": "dist/index.js", diff --git a/packages/system/src/note-collection.ts b/packages/system/src/note-collection.ts index 13761d47..077cd8f2 100644 --- a/packages/system/src/note-collection.ts +++ b/packages/system/src/note-collection.ts @@ -72,7 +72,7 @@ export class KeyedReplaceableNoteStore extends HookedNoteStore { const existing = this.#events.get(keyOnEvent); if (a.created_at > (existing?.created_at ?? 0)) { if (existing) { - a.relays = dedupe([...existing.relays, ...a.relays]); + a.relays = dedupe([...(existing.relays ?? []), ...a.relays]); } this.#events.set(keyOnEvent, a); changes.push(a);