Skip to content

Commit 9c03c44

Browse files
author
Mike Taylor
committed
Merge pull request #1073 from webcompat/labelsupdatefix
Fixes #1045. Ensure label list UI is updated when labels are set
2 parents f87180b + 3e7bae3 commit 9c03c44

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

webcompat/static/js/lib/issues.js

+4
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,10 @@ issues.StateButtonView = Backbone.View.extend({
322322
this.model.on('change:state', _.bind(function() {
323323
this.render();
324324
}, this));
325+
326+
this.model.on('change:labels', _.bind(function() {
327+
this.mainView.labels.renderLabels();
328+
}, this));
325329
},
326330
template: _.template($('#state-button-tmpl').html()),
327331
render: function() {

webcompat/static/js/lib/models/label-list.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ issues.LabelList = Backbone.Model.extend({
6565
'remoteName': matches[0]
6666
};
6767
} else {
68-
if (typeof theLabel === 'object') {
68+
if (typeof labelsArray[i] === 'object') {
6969
list[i] = labelsArray[i];
7070
list[i].remoteName = list[i].name;
7171
} else {

0 commit comments

Comments
 (0)