Skip to content

Commit

Permalink
Issue #687. Actually only show upload if FormData is supported.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Taylor committed Oct 1, 2015
1 parent 72b7942 commit 3c053bd
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions webcompat/static/js/lib/issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,19 +312,19 @@ issues.MainView = Backbone.View.extend({
var headersBag = {headers: {'Accept': 'application/json'}};
this.issue.fetch(headersBag).success(_.bind(function() {
_.each([this.title, this.metadata, this.body, this.labels,
this.stateButton, this.imageUpload, this],
this.stateButton, this],
function(elm) {
if (elm === this.imageUpload && this._supportsFormData) {
elm.render();
} else {
elm.render();
_.each($('.wc-IssueDetail-details code'), function(elm) {
Prism.highlightElement(elm);
});
}
elm.render();
_.each($('.wc-IssueDetail-details code'), function(elm) {
Prism.highlightElement(elm);
});
}
);

if (this._supportsFormData) {
this.imageUpload.render();
}

// If there are any comments, go fetch the model data
if (this.issue.get('commentNumber') > 0) {
this.comments.fetch(headersBag).success(_.bind(function() {
Expand Down

0 comments on commit 3c053bd

Please sign in to comment.