Let comment change event handler multitask.

This commit is contained in:
Karishma Chadha 2018-06-07 11:04:03 -04:00
parent 7b55d8e7ab
commit 6bc04c4bef

View file

@ -375,18 +375,14 @@ class Blocks {
const change = e.newContents_; const change = e.newContents_;
if (change.hasOwnProperty('minimized')) { if (change.hasOwnProperty('minimized')) {
comment.minimized = change.minimized; comment.minimized = change.minimized;
break; }
} else if (change.hasOwnProperty('width') && change.hasOwnProperty('height')){ if (change.hasOwnProperty('width') && change.hasOwnProperty('height')){
comment.width = change.width; comment.width = change.width;
comment.height = change.height; comment.height = change.height;
break;
} else if (change.hasOwnProperty('text')) {
comment.text = change.text;
break;
} }
log.warn(`Unrecognized comment change: ${ if (change.hasOwnProperty('text')) {
JSON.stringify(change)} for comment with id: ${e.commentId}.`); comment.text = change.text;
return; }
} }
break; break;
case 'comment_move': case 'comment_move':