Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Wrong Config property name in /lib/utils/config.js #429

Open
Lodeli opened this issue Jul 2, 2021 · 2 comments · May be fixed by #431
Open

[BUG] Wrong Config property name in /lib/utils/config.js #429

Lodeli opened this issue Jul 2, 2021 · 2 comments · May be fixed by #431
Assignees
Labels
bug Something isn't working

Comments

@Lodeli
Copy link

Lodeli commented Jul 2, 2021

Describe the bug
The code at /lib/utils/config.js:136 is checking the property
var embedType = config.embedType;
With typescript in the Config interface the property is named 'type', so this check always returns undefined, leading to a "Wrong embed type" exception.

To Reproduce
Steps to reproduce the behavior:

  1. Create a brand new react project using typescript template
  2. Create a functional component and call the useReport() hook to have the report and the setter
  3. Create a configuration object, of type Config
  4. Call the setter passing the Config object
  5. Run the app

Expected behavior
No exception for valid embed types.

@Lodeli Lodeli added the bug Something isn't working label Jul 2, 2021
@akshay5995
Copy link
Owner

akshay5995 commented Jul 2, 2021

Thanks for reporting - Can you provide me with an example of your config ? that you're passing into embed ?

@muthu1712 muthu1712 self-assigned this Jul 3, 2021
@akshay5995 akshay5995 removed their assignment Jul 3, 2021
@akshay5995
Copy link
Owner

@muthu1712 will raise a PR for this

@muthu1712 muthu1712 linked a pull request Jul 3, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants