Skip to content

Commit f99d34f

Browse files
committed
linting fixes
1 parent 7c47522 commit f99d34f

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

nodes/utils/index.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,40 +38,39 @@ async function appendTopic (RED, config, wNode, msg) {
3838
*/
3939
function addConnectionCredentials (RED, msg, conn, config) {
4040
if (config.includeClientData) {
41-
4241
// Add _client to each element
4342
const addClientData = (item) => {
4443
if (!item._client) {
4544
item._client = {}
4645
}
4746
RED.plugins.getByType('node-red-dashboard-2').forEach(plugin => {
4847
if (plugin.hooks?.onAddConnectionCredentials && item) {
49-
item = plugin.hooks.onAddConnectionCredentials(conn, item);
48+
item = plugin.hooks.onAddConnectionCredentials(conn, item)
5049
}
51-
});
50+
})
5251
item._client = {
5352
...item._client,
5453
...{
5554
socketId: conn.id,
5655
socketIp: conn.handshake?.address
5756
}
58-
};
59-
return item;
60-
};
57+
}
58+
return item
59+
}
6160

6261
// Handle arrays and nested arrays
6362
const processMsg = (data) => {
6463
if (Array.isArray(data)) {
65-
return data.map(item => processMsg(item));
64+
return data.map(item => processMsg(item))
6665
} else if (typeof data === 'object' && data !== null) {
6766
return addClientData(data)
6867
}
69-
return data;
70-
};
68+
return data
69+
}
7170

7271
msg = processMsg(msg)
7372
}
74-
return msg;
73+
return msg
7574
}
7675

7776
function getThirdPartyWidgets (directory) {

0 commit comments

Comments
 (0)