Skip to content

Commit 632c1e0

Browse files
author
Mike Taylor
committed
Issue #660. Use _.bind() rather than self.
1 parent 6c21577 commit 632c1e0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

webcompat/static/js/lib/models/issue.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@
121121
data: JSON.stringify(labelsToUpdate),
122122
type: 'POST',
123123
url: '/api/issues/' + this.get('number') + '/labels',
124-
success: function(response) {
124+
success: _.bind(function(response) {
125125
//update model after success
126-
self.set('labels', response);
127-
},
126+
this.set('labels', response);
127+
}, this),
128128
error: function() {
129129
var msg = 'There was an error setting labels.';
130130
wcEvents.trigger('flash:error', {message: msg, timeout: 2000});

0 commit comments

Comments
 (0)