Moment.js conflict (needs updating?)
-
I found a conflict where Moment Timezone (an addon for Moment.js) is not loading with EventOn Lite. Moment Timezone works fine when EventOn Lite is disabled, so I suspect the minified version of
moment.min.js
may need updating.
Unfortunately I can’t see what version you’ve included because the unminified version is not in the plugin. To help prevent conflicts and help with debugging, it would be better practice to include any unminified files along with the minified ones, and check for theSCRIPT_DEBUG
constant, so that if present, you’d remove the.min
suffix in the enqueuing process.Also worth noting that the version of Moment included and registered via WordPress core works fine with Moment Timezone… so you don’t even need to include your own version of Moment in the plugin, you can use simply:
wp_enqueue_script( 'moment' );
- The topic ‘Moment.js conflict (needs updating?)’ is closed to new replies.