Errors inside components do not reach window.onerror event handler while using the Mithril router, mounting components with m.route. Instead they do when the component is mounted with m.mount.
This didn't happen in 1.x.
Mithril version:
2.0.4
Browser and OS:
Firefox 81 64bit, Windows 10
Code
[flems] m.route with Mithril 1.1.7, working as expected
[flems] m.route with Mithril 2.0.4, not forwarding
[flems] m.mount with Mithril 2.0.4, working as expected
Context
Without errors being forwarded to window.onerror it's impossible to catch them globally and log them, i.e. to an application monitoring and error tracking platform like Sentry.
Errors inside components do not reach
window.onerrorevent handler while using the Mithril router, mounting components withm.route. Instead they do when the component is mounted withm.mount.This didn't happen in 1.x.
Mithril version:
2.0.4
Browser and OS:
Firefox 81 64bit, Windows 10
Code
[flems]
m.routewith Mithril 1.1.7, working as expected[flems]
m.routewith Mithril 2.0.4, not forwarding[flems]
m.mountwith Mithril 2.0.4, working as expectedContext
Without errors being forwarded to
window.onerrorit's impossible to catch them globally and log them, i.e. to an application monitoring and error tracking platform like Sentry.