From f6991c226abd314e63205f5cea3427d5f71a6ece Mon Sep 17 00:00:00 2001 From: Kien La Date: Sun, 22 Sep 2024 13:24:59 -0400 Subject: [PATCH] modules null check --- src/staxfile/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/staxfile/index.ts b/src/staxfile/index.ts index 08fdc2d..8b207a8 100644 --- a/src/staxfile/index.ts +++ b/src/staxfile/index.ts @@ -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 }