mirror of
https://github.com/WenPai-org/wpmind.git
synced 2025-08-03 11:11:27 +08:00
Update index.js
This commit is contained in:
parent
df2d7c3759
commit
cf1d2c7c65
1 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue