// Replay old comments and images to a newly-joining client
socket.emit('reset');
- state.comments.forEach((comment) => {
- socket.emit('comment', comment)
- });
state.images.forEach((image) => {
socket.emit('image', image)
});
+ state.comments.forEach((comment) => {
+ socket.emit('comment', comment)
+ });
socket.on('set-name', (name) => {
console.log("Received set-name event: " + name);