aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/settingsWS
diff options
context:
space:
mode:
authorLibravatar Markus Hatvan <markus_hatvan@aon.at>2021-09-14 19:58:52 +0200
committerLibravatar GitHub <noreply@github.com>2021-09-14 19:58:52 +0200
commit95df3522a15631abc51a4295cae0ea401a8d4e1e (patch)
treee5eb0f368c947683f01458e912f21756fb0d99cb /src/features/settingsWS
parentdocs: add sad270 as a contributor for bug, userTesting [skip ci] (#1941) (diff)
downloadferdium-app-95df3522a15631abc51a4295cae0ea401a8d4e1e.tar.gz
ferdium-app-95df3522a15631abc51a4295cae0ea401a8d4e1e.tar.zst
ferdium-app-95df3522a15631abc51a4295cae0ea401a8d4e1e.zip
feat: add eslint-plugin-unicorn (#1936)
Diffstat (limited to 'src/features/settingsWS')
-rwxr-xr-xsrc/features/settingsWS/store.js20
1 files changed, 11 insertions, 9 deletions
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 {
25 this.stores = stores; 25 this.stores = stores;
26 this.actions = actions; 26 this.actions = actions;
27 27
28 this._registerReactions(createReactions([ 28 this._registerReactions(
29 this._initialize.bind(this), 29 createReactions([
30 this._reconnect.bind(this), 30 this._initialize.bind(this),
31 this._close.bind(this), 31 this._reconnect.bind(this),
32 ])); 32 this._close.bind(this),
33 ]),
34 );
33 } 35 }
34 36
35 connect() { 37 connect() {
@@ -51,12 +53,12 @@ export class SettingsWSStore extends FeatureStore {
51 this.heartbeat(); 53 this.heartbeat();
52 }); 54 });
53 55
54 this.ws.on('message', (data) => { 56 this.ws.on('message', data => {
55 const resp = JSON.parse(data); 57 const resp = JSON.parse(data);
56 debug('Received message', resp); 58 debug('Received message', resp);
57 59
58 if (resp.id) { 60 if (resp.id) {
59 this.stores.user.getUserInfoRequest.patch((result) => { 61 this.stores.user.getUserInfoRequest.patch(result => {
60 if (!result) return; 62 if (!result) return;
61 63
62 debug('Patching user object with new values'); 64 debug('Patching user object with new values');
@@ -66,8 +68,8 @@ export class SettingsWSStore extends FeatureStore {
66 }); 68 });
67 69
68 this.ws.on('ping', this.heartbeat.bind(this)); 70 this.ws.on('ping', this.heartbeat.bind(this));
69 } catch (err) { 71 } catch (error) {
70 console.err(err); 72 console.error(error);
71 } 73 }
72 } 74 }
73 75