File tree 1 file changed +2
-2
lines changed
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.
503
503
``` js
504
504
io .on (' connection' , (socket ) => {
505
505
socket .join (' room 237' , () => {
506
- let rooms = Objects .keys (socket .rooms );
506
+ let rooms = Object .keys (socket .rooms );
507
507
console .log (rooms); // [ <socket.id>, 'room 237' ]
508
508
});
509
509
});
@@ -659,7 +659,7 @@ Adds the client to the `room`, and fires optionally a callback with `err` signat
659
659
``` js
660
660
io .on (' connection' , (socket ) => {
661
661
socket .join (' room 237' , () => {
662
- let rooms = Objects .keys (socket .rooms );
662
+ let rooms = Object .keys (socket .rooms );
663
663
console .log (rooms); // [ <socket.id>, 'room 237' ]
664
664
io .to (' room 237' , ' a new user has joined the room' ); // broadcast to everyone in the room
665
665
});
You can’t perform that action at this time.
0 commit comments