From 3d2c6a58a25125e57528ba86617042f3de7fbeda Mon Sep 17 00:00:00 2001 From: Florent Date: Tue, 6 Jul 2021 15:40:35 +0200 Subject: [PATCH] fix typos and minor improvements --- src/listener-rss-aggregator.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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[]) {