Skip to content

Node.js based forum software built for the modern web

remove listeners before adding

barisusaklie6371ad539a4
diff --git a/public/src/forum/topic/events.js b/public/src/forum/topic/events.js
index 60d9e69dd4..133c7baeec 100644
--- a/public/src/forum/topic/events.js
+++ b/public/src/forum/topic/events.js
@@ -42,6 +42,7 @@ define('forum/topic/events', ['forum/topic/browsing', 'forum/topic/postTools', '
};
Events.init = function() {
+ Events.removeListeners();
for(var eventName in events) {
if (events.hasOwnProperty(eventName)) {
socket.on(eventName, events[eventName]);