From 625ae76979daed3a16a6ea18dd2db8e74395cd50 Mon Sep 17 00:00:00 2001 From: sclausen Date: Tue, 8 May 2018 22:51:35 +0200 Subject: [PATCH] Fixed indentation and created new version for #86. --- package-lock.json | 2 +- package.json | 2 +- src/mqtt.service.ts | 18 +++++++++--------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2c118eb..bd4a3fd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "ngx-mqtt", - "version": "6.1.0", + "version": "6.1.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 0d76540..2264009 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ngx-mqtt", - "version": "6.1.0", + "version": "6.1.1", "description": "ngx mqtt client library", "main": "bundles/ngx-mqtt.min.js", "module": "./src/index.js", diff --git a/src/mqtt.service.ts b/src/mqtt.service.ts index b096946..c841d53 100644 --- a/src/mqtt.service.ts +++ b/src/mqtt.service.ts @@ -144,15 +144,15 @@ export class MqttService { () => { const subscription: Subscription = new Subscription(); this.client.subscribe(filterString, (err, granted: ISubscriptionGrant[]) => { - if(granted) { // granted can be undefined when an error occurs when the client is disconnecting - granted.forEach((granted_: ISubscriptionGrant) => { - if (granted_.qos === 128) { - delete this.observables[granted_.topic]; - this.client.unsubscribe(granted_.topic); - rejected.error(`subscription for '${granted_.topic}' rejected!`); - } - this._onSuback.emit({filter: filterString, granted: granted_.qos !== 128}); - }); + if (granted) { // granted can be undefined when an error occurs when the client is disconnecting + granted.forEach((granted_: ISubscriptionGrant) => { + if (granted_.qos === 128) { + delete this.observables[granted_.topic]; + this.client.unsubscribe(granted_.topic); + rejected.error(`subscription for '${granted_.topic}' rejected!`); + } + this._onSuback.emit({filter: filterString, granted: granted_.qos !== 128}); + }); } }); subscription.add(() => {