leonvogt / hotwire-dev-tools

Browser Dev Tools for Turbo and Stimulus
MIT License
184 stars 4 forks source link

Ensure Stimulus controllers are registered correctly in Firefox #41

Closed leonvogt closed 3 months ago

leonvogt commented 3 months ago

Before this change, there was a bug in Firefox where the registered Stimulus controllers on the window.Stimulus object were never saved. This happened because event.data.registeredControllers.constructor === Array always returned false. For some reason, this array detection method didn't work in Firefox. I'm not going to investigate further, since I don't think we really need this check.