Skip to content

Commit

Permalink
TypeError: project.modules.module.map is not a function (#1504)
Browse files Browse the repository at this point in the history
  • Loading branch information
readonlyuser1 authored Dec 22, 2024
1 parent 5e09a04 commit c390a0d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2558,7 +2558,13 @@ export function parsePom(pomFile) {
).toString();
}
if (project?.modules?.module) {
modules = project.modules.module.map((m) => m?._);
if (Array.isArray(project.modules.module)) {
// If it's an array, proceed with mapping
modules = project.modules.module.map((m) => m?._);
} else {
// If not an array, handle/convert it accordingly. For instance:
modules = [project.modules.module._];
}
}
if (project?.properties) {
for (const aprop of Object.keys(project.properties)) {
Expand Down

0 comments on commit c390a0d

Please sign in to comment.