mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
Merge pull request #1980 from khassel/socketclient_fix
socketclient.js: add backward compatibility for old module code
This commit is contained in:
commit
fc624359c5
@ -17,6 +17,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- The broken modules due to Socket.io change from last release [#1973](https://github.com/MichMich/MagicMirror/issues/1973)
|
- The broken modules due to Socket.io change from last release [#1973](https://github.com/MichMich/MagicMirror/issues/1973)
|
||||||
|
- Add backward compatibilty for old module code in socketclient.js [#1973](https://github.com/MichMich/MagicMirror/issues/1973)
|
||||||
|
|
||||||
## [2.11.0] - 2020-04-01
|
## [2.11.0] - 2020-04-01
|
||||||
|
|
||||||
|
@ -8,8 +8,12 @@ var MMSocket = function(moduleName) {
|
|||||||
self.moduleName = moduleName;
|
self.moduleName = moduleName;
|
||||||
|
|
||||||
// Private Methods
|
// Private Methods
|
||||||
|
var base = "/";
|
||||||
|
if ((typeof config !== "undefined") && (typeof config.basePath !== "undefined")) {
|
||||||
|
base = config.basePath;
|
||||||
|
}
|
||||||
self.socket = io("/" + self.moduleName, {
|
self.socket = io("/" + self.moduleName, {
|
||||||
path: config.basePath + "socket.io"
|
path: base + "socket.io"
|
||||||
});
|
});
|
||||||
var notificationCallback = function() {};
|
var notificationCallback = function() {};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user