Skip to content

Commit 583ce9c

Browse files
authored
fix(generateJSAttributes): Allow attributes to be undefined (#36)
This is the same as for CSS as we cannot guarantee webpack is generating the files.
1 parent 88d1bbf commit 583ce9c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,12 @@ function generateJSReferences({
102102
}: {
103103
files: string[];
104104
publicPath: string;
105-
attributes: Attributes;
105+
attributes: Attributes | undefined;
106106
}): string {
107+
if (!attributes) {
108+
return '';
109+
}
110+
107111
return files
108112
.map(
109113
(file) =>

0 commit comments

Comments
 (0)