We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ydoc.isDestroyed
1 parent 7422b18 commit f604250Copy full SHA for f604250
src/utils/Doc.js
@@ -104,6 +104,7 @@ export class Doc extends ObservableV2 {
104
* lost (with false as a parameter).
105
*/
106
this.isSynced = false
107
+ this.isDestroyed = false
108
/**
109
* Promise that resolves once the document has been loaded from a presistence provider.
110
@@ -322,6 +323,7 @@ export class Doc extends ObservableV2 {
322
323
* Emit `destroy` event and unregister all event handlers.
324
325
destroy () {
326
+ this.isDestroyed = true
327
array.from(this.subdocs).forEach(subdoc => subdoc.destroy())
328
const item = this._item
329
if (item !== null) {
0 commit comments