Skip to content

Commit

Permalink
check module.module
Browse files Browse the repository at this point in the history
  • Loading branch information
bugsounet committed May 10, 2024
1 parent 3b00357 commit 6647160
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ _This release is scheduled to be released on 2024-07-01._

### Fixed

- Fix crash possibility if `module: <name>` is not defined

## [2.27.0] - 2024-04-01

Thanks to: @bugsounet, @crazyscot, @illimarkangur, @jkriegshauser, @khassel, @KristjanESPERANTO, @Paranoid93, @rejas, @sdetweil and @vppencilsharpener.
Expand Down
6 changes: 4 additions & 2 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,10 @@ function App () {

let modules = [];
for (const module of config.modules) {
if (!modules.includes(module.module) && !module.disabled) {
modules.push(module.module);
if (module.module) {
if (!module.disabled) modules.push(module.module);
} else {
Log.warn("No module name found for this configuration:", module);
}
}

Expand Down
3 changes: 2 additions & 1 deletion js/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check failure on line 53 in js/loader.js

View workflow job for this annotation

GitHub Actions / test (18.x)

Expected parentheses around arrow function argument

Check failure on line 53 in js/loader.js

View workflow job for this annotation

GitHub Actions / test (20.x)

Expected parentheses around arrow function argument

Check failure on line 53 in js/loader.js

View workflow job for this annotation

GitHub Actions / test (22.x)

Expected parentheses around arrow function argument
return AllModules;
};

/**
Expand Down

0 comments on commit 6647160

Please sign in to comment.