diff --git a/src/editor/processors/blocks-stream-processor/index.js b/src/editor/processors/blocks-stream-processor/index.js index 24629f9..e1915d0 100644 --- a/src/editor/processors/blocks-stream-processor/index.js +++ b/src/editor/processors/blocks-stream-processor/index.js @@ -52,7 +52,10 @@ export default class BlocksStreamProcessor { const dataContent = line.slice(6); const data = JSON.parse(dataContent); - if (data.done === true) { + if (data.error) { + this.handleError(data); + break; + } else if (data.done === true) { if (this.jsonBuffer) { await this.parseAndDispatchBlocks( this.jsonBuffer,