mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
Rename global version variable
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
<!-- custom.css is loaded by the loader.js to make sure it's loaded after the module css files. -->
|
<!-- custom.css is loaded by the loader.js to make sure it's loaded after the module css files. -->
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var version = "#VERSION#";
|
window.mmVersion = "#VERSION#";
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@@ -498,8 +498,8 @@ Module.create = function (name) {
|
|||||||
|
|
||||||
Module.register = function (name, moduleDefinition) {
|
Module.register = function (name, moduleDefinition) {
|
||||||
if (moduleDefinition.requiresVersion) {
|
if (moduleDefinition.requiresVersion) {
|
||||||
Log.log("Check MagicMirror version for module '" + name + "' - Minimum version: " + moduleDefinition.requiresVersion + " - Current version: " + window.version);
|
Log.log("Check MagicMirror version for module '" + name + "' - Minimum version: " + moduleDefinition.requiresVersion + " - Current version: " + window.mmVersion);
|
||||||
if (cmpVersions(window.version, moduleDefinition.requiresVersion) >= 0) {
|
if (cmpVersions(window.mmVersion, moduleDefinition.requiresVersion) >= 0) {
|
||||||
Log.log("Version is ok!");
|
Log.log("Version is ok!");
|
||||||
} else {
|
} else {
|
||||||
Log.warn("Version is incorrect. Skip module: '" + name + "'");
|
Log.warn("Version is incorrect. Skip module: '" + name + "'");
|
||||||
|
Reference in New Issue
Block a user