Skip to content

Commit

Permalink
fix(react): fix custom element undefined error in electron (#457)
Browse files Browse the repository at this point in the history
  • Loading branch information
muratcorlu authored Mar 2, 2023
1 parent 4dbdea7 commit b645758
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports = {
[
'storybook',
'design',
'react',
// Components as scopes listed below
'button',
'icon',
Expand Down
4 changes: 2 additions & 2 deletions scripts/generate-react-exports.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ for (const module of customElementsModules) {

baklavaReactFileParts.push(
`export const ${componentName} = React.lazy<ReactWebComponent<${Type}${eventTypes}>>(() =>
customElements.whenDefined('${fileName}').then(elem => ({
customElements.whenDefined('${fileName}').then(() => ({
default: createComponent<${Type}>(
{
react: React,
tagName: '${fileName}',
elementClass: elem,
elementClass: customElements.get('${fileName}'),
events: ${JSON.stringify(eventNames)}
}
)
Expand Down

0 comments on commit b645758

Please sign in to comment.