seatsio / seatsio-react

The official Seats.io React wrapper
https://www.seats.io
MIT License
22 stars 15 forks source link

external chartjs IIFE not working #219

Open vjaro opened 2 months ago

vjaro commented 2 months ago

Hello,

Just to preface that the application works fine when embedded into a standalone react application.

I'm using this tool https://www.npmjs.com/package/@mendix/generator-widget to port this as a plugin into Mendix. I'm trying to render the SeatsioSeatingChart but i'm getting the following error.

image

Upon checking, it looks like the chartjs script is successfully retrieved and added to the DOM, but this line is expecting an object but doesn't get any value.

https://github.com/seatsio/seatsio-react/blob/264266b8fa29f977594caefc6289832181b9c1c2/src/main/Embeddable.tsx#L81

Any idea what might be causing this issue? Thanks in anticipation.