From 94646b2f45cbc5f2d5d32f19eaaf2ff1787cac47 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Fri, 7 Aug 2020 19:29:08 +0200 Subject: [PATCH] fix item.content undefined --- src/types/YText.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/types/YText.js b/src/types/YText.js index 51eb02de..b80ce5b3 100644 --- a/src/types/YText.js +++ b/src/types/YText.js @@ -782,8 +782,7 @@ export class YText extends AbstractType { continue } iterateStructs(transaction, /** @type {Array} */ (doc.store.clients.get(client)), clock, afterClock, item => { - // @ts-ignore - if (item.content.constructor === ContentFormat) { + if (!item.deleted && /** @type {Item} */ (item).content.constructor === ContentFormat) { foundFormattingItem = true } })