diff --git a/abstract-relay.ts b/abstract-relay.ts index e8c88de..0f3b397 100644 --- a/abstract-relay.ts +++ b/abstract-relay.ts @@ -481,6 +481,8 @@ export class Subscription { private eoseTimeoutHandle: ReturnType | undefined constructor(relay: AbstractRelay, id: string, filters: Filter[], params: SubscriptionParams) { + if (filters.length === 0) throw new Error("subscription can't be created with zero filters") + this.relay = relay this.filters = filters this.id = id