mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-22 07:34:16 +00:00
fix(load) load funcError: could be no callback
This commit is contained in:
parent
b7452ae846
commit
8cbbc52a74
1 changed files with 5 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue