Преглед изворни кода

fix: ensure user-event type is preserved in WebSocket message output

The spread operator order was causing incoming event types to overwrite
the user-event type marker.
Jesse Vincent пре 7 месеци
родитељ
комит
d20bdb8ec4
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      lib/brainstorm-server/index.js

+ 1 - 1
lib/brainstorm-server/index.js

@@ -47,7 +47,7 @@ wss.on('connection', (ws) => {
   ws.on('message', (data) => {
     // User interaction event - write to stdout for Claude
     const event = JSON.parse(data.toString());
-    console.log(JSON.stringify({ type: 'user-event', ...event }));
+    console.log(JSON.stringify({ ...event, type: 'user-event' }));
   });
 });