Skip to content

Commit 0466719

Browse files
committed
fix: Filter out modules without an absolutePath
issue: #5
1 parent a1617ec commit 0466719

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

lib/customSerializer.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,12 @@ function toModuleStruct(m, includeCode) {
8989
lineCount: m.output[0].data.lineCount,
9090
sizeInBytes: getStringSizeInBytes(outputCode),
9191
},
92-
dependencies: Array.from(m?.dependencies?.values?.() ?? []).map((e) => ({
93-
absolutePath: e.absolutePath,
94-
name: e.data.name,
95-
})),
92+
dependencies: Array.from(m?.dependencies?.values?.() ?? [])
93+
.filter((e) => e.absolutePath)
94+
.map((e) => ({
95+
absolutePath: e.absolutePath,
96+
name: e.data.name,
97+
})),
9698
};
9799
}
98100

0 commit comments

Comments
 (0)