Skip to content

Commit

Permalink
fix(generateJSAttributes): Allow attributes to be undefined (#36)
Browse files Browse the repository at this point in the history
This is the same as for CSS as we cannot guarantee webpack is generating the files.
  • Loading branch information
bebraw authored May 12, 2020
1 parent 88d1bbf commit 583ce9c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,12 @@ function generateJSReferences({
}: {
files: string[];
publicPath: string;
attributes: Attributes;
attributes: Attributes | undefined;
}): string {
if (!attributes) {
return '';
}

return files
.map(
(file) =>
Expand Down

0 comments on commit 583ce9c

Please sign in to comment.