CommentChange events now store text changes in an object with property text, instead of just a string.

This commit is contained in:
Karishma Chadha 2018-06-07 10:09:38 -04:00
parent 332e90e408
commit d99a082952

View file

@ -374,7 +374,6 @@ class Blocks {
}
const comment = currTarget.comments[e.commentId];
const change = e.newContents_;
if (typeof change === 'object') {
if (change.hasOwnProperty('minimized')) {
comment.minimized = change.minimized;
break;
@ -382,9 +381,8 @@ class Blocks {
comment.width = change.width;
comment.height = change.height;
break;
}
} else if (typeof change === 'string') {
comment.text = change;
} else if (change.hasOwnProperty('text')) {
comment.text = change.text;
break;
}
log.warn(`Unrecognized comment change: ${