From 95df3522a15631abc51a4295cae0ea401a8d4e1e Mon Sep 17 00:00:00 2001 From: Markus Hatvan Date: Tue, 14 Sep 2021 19:58:52 +0200 Subject: feat: add eslint-plugin-unicorn (#1936) --- src/features/settingsWS/store.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src/features/settingsWS') diff --git a/src/features/settingsWS/store.js b/src/features/settingsWS/store.js index 9100f33d1..e36ccee72 100755 --- a/src/features/settingsWS/store.js +++ b/src/features/settingsWS/store.js @@ -25,11 +25,13 @@ export class SettingsWSStore extends FeatureStore { this.stores = stores; this.actions = actions; - this._registerReactions(createReactions([ - this._initialize.bind(this), - this._reconnect.bind(this), - this._close.bind(this), - ])); + this._registerReactions( + createReactions([ + this._initialize.bind(this), + this._reconnect.bind(this), + this._close.bind(this), + ]), + ); } connect() { @@ -51,12 +53,12 @@ export class SettingsWSStore extends FeatureStore { this.heartbeat(); }); - this.ws.on('message', (data) => { + this.ws.on('message', data => { const resp = JSON.parse(data); debug('Received message', resp); if (resp.id) { - this.stores.user.getUserInfoRequest.patch((result) => { + this.stores.user.getUserInfoRequest.patch(result => { if (!result) return; debug('Patching user object with new values'); @@ -66,8 +68,8 @@ export class SettingsWSStore extends FeatureStore { }); this.ws.on('ping', this.heartbeat.bind(this)); - } catch (err) { - console.err(err); + } catch (error) { + console.error(error); } } -- cgit v1.2.3-70-g09d2