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) {