Skip to content

Commit

Permalink
fix: react wrapper for component files with multiple exports (#331)
Browse files Browse the repository at this point in the history
  • Loading branch information
muratcorlu authored Dec 2, 2022
1 parent 5386778 commit fe3eed3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/generate-react-exports.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ const baklavaReactFileParts = [];

for (const module of customElementsModules) {
const { declarations, path } = module;
const { events, name: componentName, tagName: fileName } = declarations[0];
const componentDeclaration = declarations.find(declaration => declaration.customElement === true);

const { events, name: componentName, tagName: fileName } = componentDeclaration;

const eventNames = events
? events.reduce((acc, curr) => {
Expand Down

0 comments on commit fe3eed3

Please sign in to comment.