JavaScript error on new month view
-
I’m seeing this error when I try out the new V5 month view.
Uncaught TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at Object.obj.setContainerClasses (breakpoints.js?ver=5.0.0.1:1)
at Object.obj.initTasks (breakpoints.js?ver=5.0.0.1:1)
at Object.obj.setup (breakpoints.js?ver=5.0.0.1:3)
at <anonymous>:4:41
at t.activateScript (rocket-loader.min.js:1)
at rocket-loader.min.js:1
at t.run (rocket-loader.min.js:1)
at rocket-loader.min.js:1
at HTMLScriptElement.<anonymous> (rocket-loader.min.js:1)The cause appears to be that there is a script on the page, which starts:
<script type=”application/ld+json”>
[{“@context”:”https://schema.org”,”@type”:”Event”,”name”: ….When I manually remove this script from the page, the JS error no longer occurs.
Seems to be a conflict between this script:
<script class=”tribe-events-breakpoints” type=”ea309bd93536031b5cb9508c-text/javascript”>
if ( ‘undefined’ !== typeof window.tribe ) {
var scripts = document.getElementsByTagName( ‘script’ );
window.tribe.events.views.breakpoints.setup( scripts[ scripts.length – 1 ] );
}
</script>and the LD+JSON script if it’s on that page. I can comment out either of them and the errors go away.
Any idea how this error can be avoided?
- The topic ‘JavaScript error on new month view’ is closed to new replies.