Closed nicholas-c closed 5 years ago
Stimulus supports all evergreen, self-updating desktop and mobile browsers out of the box.
If your application needs to support older browsers like Internet Explorer 11, include the
@stimulus/polyfills
package before loading Stimulus.
Are you using that 👆?
Doh!!! My bad! Deepest apologies!
I get this issue again, because the @stimulus/polyfills version matcher for element-closest is pulling in 3.0.0, which doesn't work the same / is broken: https://github.com/jonathantneal/closest/issues/25 & https://github.com/jonathantneal/closest/blob/master/CHANGELOG.md
Fixed in v1.1.1 via https://github.com/stimulusjs/stimulus/commit/0251c87795f351a7462d00fa0f028b2daf967a01. Thanks for the heads up, @jalada!
this is incompatible with the latest webpacker which depends on core-js 3 :(
@glaszig did you find a solution?
@chrisokamoto this occured to me while upgrading to the latest webpacker at the time on a rails 5.2 code base. i reverted that upgrade and things work fine.
@chrisokamoto this occured to me while upgrading to the latest webpacker at the time on a rails 5.2 code base. i reverted that upgrade and things work fine.
@glaszig yeah, the same for me. but I don't want to downgrade Rails and Webpacker.. I'll try something else, which include stop using stimulus.. :( it's just a small component in my case. Thanks for the reply :)
Getting this error thrown with a controller, seems to be linked to accessing a target, but unconfirmed.
Stripped back my controller to the following code... Console.log('1') fires, the rest is where the error is thrown.
Data-controller is on the body, as it needs to be a site-wide thing.
It seems to stem from this...
Edit: this.targets.findAll('counter') returns the same error in all controllers.