From 37ee0e568f9b451281d9cbb819fba6f131a7a76b Mon Sep 17 00:00:00 2001 From: Karsten Hassel Date: Tue, 7 Apr 2020 19:35:21 +0200 Subject: [PATCH] socketclient.js: add backward compatibility for old module code --- js/socketclient.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/socketclient.js b/js/socketclient.js index 7be9ce7d..5f24baf5 100644 --- a/js/socketclient.js +++ b/js/socketclient.js @@ -8,8 +8,12 @@ var MMSocket = function(moduleName) { self.moduleName = moduleName; // Private Methods + var base = "/"; + if (typeof config !== "undefined") { + base = config.basePath; + } self.socket = io("/" + self.moduleName, { - path: config.basePath + "socket.io" + path: base + "socket.io" }); var notificationCallback = function() {};