diff --git a/src/devtools/index.ts b/src/devtools/index.ts index 99699bf26..212d9c814 100644 --- a/src/devtools/index.ts +++ b/src/devtools/index.ts @@ -15,6 +15,7 @@ */ import { + DocEventType, Document, Indexable, TransactionEvent, @@ -72,6 +73,22 @@ export function setupDevtools( transactionEventsByDocKey.set(doc.getKey(), []); const unsub = doc.subscribe('all', (event) => { + if ( + event.some( + (docEvent) => + docEvent.type !== DocEventType.StatusChanged && + docEvent.type !== DocEventType.Snapshot && + docEvent.type !== DocEventType.LocalChange && + docEvent.type !== DocEventType.RemoteChange && + docEvent.type !== DocEventType.Initialized && + docEvent.type !== DocEventType.Watched && + docEvent.type !== DocEventType.Unwatched && + docEvent.type !== DocEventType.PresenceChanged, + ) + ) { + return; + } + transactionEventsByDocKey.get(doc.getKey())!.push(event); if (devtoolsStatus === 'synced') { sendToPanel({