mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 21:00:57 +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
@@ -50,7 +50,8 @@ const Loader = (function () {
|
||||
* @returns {object[]} module data as configured in config
|
||||
*/
|
||||
const getAllModules = function () {
|
||||
return config.modules;
|
||||
const AllModules = config.modules.filter((module) => (module.module !== undefined) && (MM.getAvailableModulePositions.indexOf(module.position) > -1 || typeof (module.position) === "undefined"));
|
||||
return AllModules;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user