When a required script doesn't load, the callback fires even if the script load fails (404):
function callback () {
console.log('callback,', arguments);
}
head.test({
test: 1 === 1,
success: ["/non-existant.js"],
failure: [],
callback: callback
});
In the above example, the console outputs this regardless of whether or not the script file is loaded:
callback, []
Is there a way to handle that?