From fd81156f1a4d69e0feb2755c12c670ea175ea48a Mon Sep 17 00:00:00 2001 From: ocavue Date: Mon, 10 Nov 2025 11:38:22 +1100 Subject: [PATCH] Prevent operations on destroyed views --- src/lib.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib.js b/src/lib.js index 3f48497..1077cc1 100644 --- a/src/lib.js +++ b/src/lib.js @@ -24,6 +24,9 @@ const updateMetas = () => { const ups = /** @type {Map>} */ (viewsToUpdate) viewsToUpdate = null ups.forEach((metas, view) => { + if (view.isDestroyed) { + return + } const tr = view.state.tr const syncState = ySyncPluginKey.getState(view.state) if (syncState && syncState.binding && !syncState.binding.isDestroyed) {