powerbi-report-component icon indicating copy to clipboard operation
powerbi-report-component copied to clipboard

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

Open Lodeli opened this issue 4 years ago • 2 comments

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 avatar Jul 02 '21 10:07 Lodeli

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

akshay5995 avatar Jul 02 '21 11:07 akshay5995

@muthu1712 will raise a PR for this

akshay5995 avatar Jul 03 '21 13:07 akshay5995