From e26b71c78e48d566fc8bf3726bcec0ba872b015a Mon Sep 17 00:00:00 2001 From: Vyacheslav Aristov Date: Sat, 7 Oct 2017 15:36:02 +0300 Subject: [PATCH] [docs] Fix typo in API docs (#3066) --- docs/API.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/API.md b/docs/API.md index a3ebafa520..161a4480fb 100644 --- a/docs/API.md +++ b/docs/API.md @@ -661,7 +661,7 @@ io.on('connection', (socket) => { socket.join('room 237', () => { let rooms = Object.keys(socket.rooms); console.log(rooms); // [ , 'room 237' ] - io.to('room 237', 'a new user has joined the room'); // broadcast to everyone in the room + io.to('room 237').emit('a new user has joined the room'); // broadcast to everyone in the room }); }); ```