fix if userId in _meteorSession is undefined

This commit is contained in:
Martin Filser 2023-02-04 02:37:29 +01:00
parent ba9e2debe2
commit 68610e5066

View file

@ -117,16 +117,15 @@ I20221023-09:15:09.602(3)? at packages/ddp-server/livedata_server.js:1496:18
// update last connected user date (needed for one of the KPI)
Meteor.server.stream_server.open_sockets.forEach(
(socket) =>
//console.log('meteor session', socket._meteorSession.userId),
socket !== undefined &&
socket._meteorSession?.userId !== null &&
Users.update(socket._meteorSession.userId, {
$set: {
lastConnectionDate: new Date(),
},
}),
);
(socket) => {
if (socket?._meteorSession?.userId) {
Users.update(socket._meteorSession.userId, {
$set: {
lastConnectionDate: new Date(),
},
});
}
});
});
*/
}