Skip to content

Commit 7ece9fe

Browse files
committed
Only add new comments to the current list
In 58c9df7 we didn’t translate the code correctly and we were adding all comments to all sections on the page.
1 parent 45699d6 commit 7ece9fe

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

code_comments/htdocs/code-comments.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383

8484
addOne: function(comment) {
8585
var view = new CommentView({model: comment});
86-
view.appendTo( $( "ul.comments" ) );
86+
view.appendTo( this.$( "ul.comments" ) );
8787
},
8888
addAll: function() {
8989
var view = this;
@@ -145,7 +145,7 @@
145145
throw 'Trying to add a comment with line ' + comment.get( 'line' ) + ' into a view for line ' + this.line;
146146
}
147147
var view = new CommentView({model: comment});
148-
view.appendTo( $( "ul.comments" ) );
148+
view.appendTo( this.$( "ul.comments" ) );
149149
},
150150
showAddCommentDialog: function() {
151151
var $parentRow = $( this.el ).prev()[0],

0 commit comments

Comments
 (0)