diff --git a/src/listener-rss-aggregator.ts b/src/listener-rss-aggregator.ts index 703cf81..8ee5b3d 100644 --- a/src/listener-rss-aggregator.ts +++ b/src/listener-rss-aggregator.ts @@ -98,8 +98,8 @@ export class ListenerRssAggregator extends EventEmitter { return newListener; } - private removeOldListener(adr: string): void { - const oldListener = this.listenerMap.get(adr); + private removeOldListener(addr: string): void { + const oldListener = this.listenerMap.get(addr); if (!oldListener) return; @@ -108,7 +108,7 @@ export class ListenerRssAggregator extends EventEmitter { .removeAllListeners("update") .removeAllListeners("newEntries") .removeAllListeners("error"); - this.listenerMap.delete(adr); + this.listenerMap.delete(addr); } async registerListener(info: ListenerRss.Config) { @@ -118,11 +118,11 @@ export class ListenerRssAggregator extends EventEmitter { await this.sqliteDb.insertListener(listener); } - async unregisterListener(adr: string): Promise { - if (!this.listenerMap.has(adr)) return; + async unregisterListener(addr: string): Promise { + if (!this.listenerMap.has(addr)) return; - this.removeOldListener(adr); - await this.sqliteDb.deleteListener(adr); + this.removeOldListener(addr); + await this.sqliteDb.deleteListener(addr); } async saveOverride(expectedConfig: ListenerRss.Config[]) {