When you’re building a distributable package for a framework that is likely to have several other third-party packages installed, it’s difficult to know when modifications or additions to the framework have already been made further up the chain of operations. I recently ran into this in a package I built that relies on jQuery – another package installed on the system had already included and extended the jQuery object. When my addition came into play, the jQuery object was reset and the other package broke as a result.
To fix this, I wrote a script to test if the jQuery object had been instantiated yet and, if not, to load it. Here’s what it looks like:
If this resonates with you I'd love to help!
I help business with problems like these every day.
Click below to schedule a call.