Refactor example code in View#events docs

This commit is contained in:
dannydelott
2015-07-20 13:00:10 -07:00
parent 71a0e0150e
commit 2e43ec43c3

View File

@@ -2957,7 +2957,9 @@ var InputView = Backbone.View.extend({
render: function() { ... },
keyAction: function(e) {
if (e.which === ENTER_KEY) this.collection.add({text: this.$el.val()});
if (e.which === ENTER_KEY) {
this.collection.add({text: this.$el.val()});
}
}
});
</pre>