From cf1d2c7c65a680ef375f602b81859cda9f2fd1ed Mon Sep 17 00:00:00 2001 From: Nikita Date: Wed, 11 Dec 2024 18:01:44 +0300 Subject: [PATCH] Update index.js --- src/editor/processors/blocks-stream-processor/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/editor/processors/blocks-stream-processor/index.js b/src/editor/processors/blocks-stream-processor/index.js index bffc8eb..f30e563 100644 --- a/src/editor/processors/blocks-stream-processor/index.js +++ b/src/editor/processors/blocks-stream-processor/index.js @@ -98,7 +98,7 @@ export default class BlocksStreamProcessor { async tryParseWithDelay(jsonContent) { const now = Date.now(); - if (now - this.lastUpdate >= this.RENDER_DELAY) { + if (now - this.lastUpdate >= this.renderDelay) { await this.tryParseIncomplete(jsonContent); } } @@ -343,11 +343,11 @@ export default class BlocksStreamProcessor { // Apply render delay only in batch mode or if it's too soon if ( - (this.isBatchMode || timeSinceLastUpdate < this.RENDER_DELAY) && + (this.isBatchMode || timeSinceLastUpdate < this.renderDelay) && !isFinal ) { await new Promise((resolve) => - setTimeout(resolve, this.RENDER_DELAY - timeSinceLastUpdate) + setTimeout(resolve, this.renderDelay - timeSinceLastUpdate) ); }