@flowgram.ai/document 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2038,6 +2038,11 @@ var FlowDocument = class {
2038
2038
  * 导出数据,可以重载
2039
2039
  */
2040
2040
  toJSON() {
2041
+ if (this.disposed) {
2042
+ throw new Error(
2043
+ "The FlowDocument has been disposed and it is no longer possible to call toJSON."
2044
+ );
2045
+ }
2041
2046
  return {
2042
2047
  nodes: this.root.toJSON().blocks
2043
2048
  };