Skip to content

Commit f5bff7b

Browse files
committed
[fix] repeat fix from import-js#797 for import-js#717, in another place
1 parent 2d4f651 commit f5bff7b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/ExportMap.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@ export default class ExportMap {
3838

3939
get size() {
4040
let size = this.namespace.size + this.reexports.size
41-
this.dependencies.forEach(dep => size += dep().size)
41+
this.dependencies.forEach(dep => {
42+
const d = dep()
43+
// CJS / ignored dependencies won't exist (#717)
44+
if (d == null) return
45+
size += d.size
46+
})
4247
return size
4348
}
4449

0 commit comments

Comments
 (0)