There's a JavaScript error on the docs site when clicking on the menu dropdown (hamburger icon) when viewed on small screens:
docs-fcaf4305.js:14 Uncaught TypeError: Cannot read property '0' of null
at d (docs-fcaf4305.js:14)
at HTMLBodyElement.<anonymous> (docs-fcaf4305.js:14)
Thanks for the report @eltimn. This looks like a bug in Marko. Will investigate.
Yes is a error in marko in the event-delegation component. The bug was added in version v4.5.0-beta.0, in v4.4.28 works well. But I didn't found how to fix that I think is in components/util-browser in the method of attachBubblingEvent.
@austinkelleher Will you be publishing the fix?
Hello.
I'm facing a similar and possibly related issue. Adding this here to provide context to help anyone looking at this.
Binding an event using on-click throws an error in a component if the component is split component but works as expected if it not split.
Have created a MVP Express + Lasso + Marko app which reproduces this for illustration:
https://github.com/cravindra/marko-error-sample
Using @jlopezxs suggestion to downgrade to 4.4.28 worked but that made other features like using *:scoped on attributes stop working.
Dependencies as featured in package.json:
{
"express": "^4.16.2",
"lasso": "^2.11.20",
"lasso-marko": "^2.3.1",
"marko": "^4.5.5"
}
Stack Trace on the Browser:
template-3e4cf51f.js:1702 Uncaught TypeError: Cannot read property '0' of null
at delegateEvent (template-3e4cf51f.js:1702)
at HTMLBodyElement.<anonymous> (template-3e4cf51f.js:1755)
Update:
Tried 4.5.0 it works as expected there but the *:scoped feature stops working.
Tried 4.5.1 and it breaks there but *:scoped feature works
Published [email protected] with a fix. Let us know if you see any other issues.
Also markojs.com on mobile is also fixed.
v4.5.6 works as expected. Thanks for the quick fix @austinkelleher
Excellent. Thanks.