fix(load) load funcError: could be no callback

This commit is contained in:
coderaiser 2014-07-17 04:34:55 -04:00
parent b7452ae846
commit 8cbbc52a74

View file

@ -51,14 +51,18 @@ var Util, DOM;
},
funcError = function() {
var callback = func.onerror || func.onload || func,
var callback,
template = 'file {{ src }} could not be loaded',
isQuit = true,
msg = Util.render(template, {
src: p.src
}),
error = new Error(msg);
if (func)
callback = func.onerror || func.onload || func;
parent.removeChild(element);
Images.showError(msg, isQuit);