mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 09:42:21 -04:00
First round of undef fixes
This commit is contained in:
parent
d8f093b226
commit
b9d19cfcb4
22 changed files with 56 additions and 50 deletions
|
@ -1,4 +1,4 @@
|
|||
/* exported Module */
|
||||
/* global Class, Loader, MMSocket, nunjucks, Translator */
|
||||
|
||||
/* Magic Mirror
|
||||
* Module Blueprint.
|
||||
|
@ -6,7 +6,6 @@
|
|||
* By Michael Teeuw https://michaelteeuw.nl
|
||||
* MIT Licensed.
|
||||
*/
|
||||
|
||||
var Module = Class.extend({
|
||||
|
||||
/*********************************************************
|
||||
|
@ -237,7 +236,7 @@ var Module = Class.extend({
|
|||
*/
|
||||
socket: function () {
|
||||
if (typeof this._socket === "undefined") {
|
||||
this._socket = this._socket = new MMSocket(this.name);
|
||||
this._socket = new MMSocket(this.name);
|
||||
}
|
||||
|
||||
var self = this;
|
||||
|
@ -467,8 +466,8 @@ function cmpVersions(a, b) {
|
|||
Module.register = function (name, moduleDefinition) {
|
||||
|
||||
if (moduleDefinition.requiresVersion) {
|
||||
Log.log("Check MagicMirror version for module '" + name + "' - Minimum version: " + moduleDefinition.requiresVersion + " - Current version: " + version);
|
||||
if (cmpVersions(version, moduleDefinition.requiresVersion) >= 0) {
|
||||
Log.log("Check MagicMirror version for module '" + name + "' - Minimum version: " + moduleDefinition.requiresVersion + " - Current version: " + global.version);
|
||||
if (cmpVersions(global.version, moduleDefinition.requiresVersion) >= 0) {
|
||||
Log.log("Version is ok!");
|
||||
} else {
|
||||
Log.log("Version is incorrect. Skip module: '" + name + "'");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue