If you use moment.js in your help-center theme, have you noticed it's not working for last couple of days?
It seems a recent update by Zendesk to it's help-center infrastructure or something that loads in theme in background has broken the use of moment.js libraries.
The browser version of moment.js is loaded via script tag, and the moment() function becomes available. It seems, Zendesk is using moment.js but it's probably different type (AMD, ES6, etc) because moment is an object not function.
Anyway, I think -- whatever Zendesk is using they should encapsulate such libraries or keep the scope limited to their own code. It shouldn't override the behaviour of what customers use in help-center themes -- jquery, moment, etc are quite common libraries used for variety of purposes. While we have used our own jquery version but always used noConflict() method to freeze it's scope; I am not sure moment.js has that one, and we can't go back in time and do it for all customers?
In this case Zendesk is in position to do it easily than thousands of help-center seeing broken code, and fixing.
Please sign in to leave a comment.