🐛 Fixed broken editor state when deleting a selection containing cards

closes https://github.com/TryGhost/Ghost/issues/9852
- Ember was throwing an error because we weren't using `.set` to set properties on the editor component which halted execution whilst the component cards were being re-rendered
This commit is contained in:
Kevin Ansfield 2018-09-17 11:46:26 +01:00
parent 8f4246e3b6
commit 4ba9c6e582
1 changed files with 5 additions and 3 deletions

View File

@ -1257,9 +1257,11 @@ export default Component.extend({
if (wordCount !== this.wordCount || imageCount !== this.imageCount) {
let readingTime = calculateReadingTime({wordCount, imageCount});
this.wordCount = wordCount;
this.imageCount = imageCount;
this.readingTime = readingTime;
this.setProperties({
wordCount,
imageCount,
readingTime
});
this.wordCountDidChange({wordCount, imageCount, readingTime});
}