powerbi-report-component
powerbi-report-component copied to clipboard
[BUG] Wrong Config property name in /lib/utils/config.js
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:
- Create a brand new react project using typescript template
- Create a functional component and call the useReport() hook to have the report and the setter
- Create a configuration object, of type Config
- Call the setter passing the Config object
- Run the app
Expected behavior No exception for valid embed types.
Thanks for reporting - Can you provide me with an example of your config ? that you're passing into embed ?
@muthu1712 will raise a PR for this