Merge pull request #3005 from jtbairdsr/master

fix bug that prevents editing or deleting comments
This commit is contained in:
Lauri Ojansivu 2020-04-09 22:30:02 +03:00 committed by GitHub
commit c4a7e53661
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -180,7 +180,7 @@ BlazeComponent.extendComponent({
{
// XXX We should use Popup.afterConfirmation here
'click .js-delete-comment'() {
const commentId = this.currentData().commentId;
const commentId = this.currentData().activity.commentId;
CardComments.remove(commentId);
},
'submit .js-edit-comment'(evt) {
@ -188,7 +188,7 @@ BlazeComponent.extendComponent({
const commentText = this.currentComponent()
.getValue()
.trim();
const commentId = Template.parentData().commentId;
const commentId = Template.parentData().activity.commentId;
if (commentText) {
CardComments.update(commentId, {
$set: {