Skip to content

Commit

Permalink
modules null check
Browse files Browse the repository at this point in the history
  • Loading branch information
kla committed Sep 22, 2024
1 parent a614026 commit f6991c2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/staxfile/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ export default class Staxfile {
}

private normalizeModules(modules) {
if (!modules)
return []

return modules.map((module) => {
if (typeof module === 'string')
module = { name: module, if: true }
Expand Down

0 comments on commit f6991c2

Please sign in to comment.