I am getting the below error, but only on some pages.

If I inspect the elements in chrome, I see the two links to the necessary dependent script files.

If I check the network tab, the two files have been loaded.
My suspicion is that this might be race condition in the loading of the asyc java script files. I am happy to try and fix it myself if you guys have a few pointers?
Thanks
Regards
Craig.