Skip to content

Commit

Permalink
opts variable might not be available on error
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Jun 6, 2014
1 parent bdd0ea2 commit 34989b5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions framework/Core/js/hordecore.js
Expand Up @@ -52,14 +52,18 @@ var HordeCore = {
onException: function(r, e)
{
this.debug('onException', e);
this.endLoading(r.opts.loading);
if (r.opts) {
this.endLoading(r.opts.loading);
}
document.fire('HordeCore:ajaxException', [ r, e ]);
},

onFailure: function(t, o)
{
this.debug('onFailure', t);
this.endLoading(t.request.opts.loading);
if (t.request.opts) {
this.endLoading(t.request.opts.loading);
}
this.notify(this.text.ajax_error, 'horde.error');
document.fire('HordeCore:ajaxFailure', [ t, o ]);
},
Expand Down

0 comments on commit 34989b5

Please sign in to comment.