@jcbuisson/express-x 1.5.30 → 1.5.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/server.mjs +3 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jcbuisson/express-x",
3
- "version": "1.5.30",
3
+ "version": "1.5.31",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "src/index.mjs",
package/src/server.mjs CHANGED
@@ -388,6 +388,9 @@ export function expressX(prisma, options = {}) {
388
388
  for (const connection of connectionList) {
389
389
  app.log('verbose', `emit to ${connection.id} ${service.name} ${action} ${result}`)
390
390
  const socket = cnx2Socket[connection.id]
391
+ if (!socket) {
392
+ continue // SHOULD NOT HAPPEN
393
+ }
391
394
  socket.emit('service-event', {
392
395
  name: service.name,
393
396
  action,