From c68f16c89c90b36941862413bbd00452dd56dcad Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Wed, 25 May 2016 18:02:39 -0500 Subject: [PATCH] Issue #1063. Hide upload spinner in the case of an error. --- webcompat/static/js/lib/issues.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/webcompat/static/js/lib/issues.js b/webcompat/static/js/lib/issues.js index 0f57c55ef..c539ac0f3 100644 --- a/webcompat/static/js/lib/issues.js +++ b/webcompat/static/js/lib/issues.js @@ -213,10 +213,11 @@ issues.ImageUploadView = Backbone.View.extend({ this.addImageUploadComment(response); this._loaderImage.hide(); }, this), - error: function() { + error: _.bind(function() { var msg = 'There was an error trying to upload the image.'; wcEvents.trigger('flash:error', {message: msg, timeout: 4000}); - } + this._loaderImage.hide(); + }, this) }); } },