mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-22 05:07:05 +00:00
Fix crash possibility if module: <name>
is not defined and on mistake position: <position>
(#3445)
Fix #3442
This commit is contained in:
committed by
GitHub
parent
4c748a4d32
commit
e95c144c3e
11
js/app.js
11
js/app.js
@@ -253,8 +253,15 @@ function App () {
|
||||
|
||||
let modules = [];
|
||||
for (const module of config.modules) {
|
||||
if (!modules.includes(module.module) && !module.disabled) {
|
||||
modules.push(module.module);
|
||||
if (module.disabled) continue;
|
||||
if (module.module) {
|
||||
if (Utils.moduleHasValidPosition(module.position) || typeof (module.position) === "undefined") {
|
||||
modules.push(module.module);
|
||||
} else {
|
||||
Log.warn("Invalid module position found for this configuration:", module);
|
||||
}
|
||||
} else {
|
||||
Log.warn("No module name found for this configuration:", module);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user