File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -503,7 +503,7 @@ A hash of strings identifying the rooms this client is in, indexed by room name.
503503``` js
504504io .on (' connection' , (socket ) => {
505505 socket .join (' room 237' , () => {
506- let rooms = Objects .keys (socket .rooms );
506+ let rooms = Object .keys (socket .rooms );
507507 console .log (rooms); // [ <socket.id>, 'room 237' ]
508508 });
509509});
@@ -659,7 +659,7 @@ Adds the client to the `room`, and fires optionally a callback with `err` signat
659659``` js
660660io .on (' connection' , (socket ) => {
661661 socket .join (' room 237' , () => {
662- let rooms = Objects .keys (socket .rooms );
662+ let rooms = Object .keys (socket .rooms );
663663 console .log (rooms); // [ <socket.id>, 'room 237' ]
664664 io .to (' room 237' , ' a new user has joined the room' ); // broadcast to everyone in the room
665665 });
You can’t perform that action at this time.
0 commit comments