From 5a32df856626e84b32f0df3fd6c9b3d6361c1c32 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Tue, 27 Sep 2022 18:58:25 +0200 Subject: [PATCH] value --- .../app/plugins/parser/services/code-parser-antlr-service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/plugins/parser/services/code-parser-antlr-service.ts b/apps/remix-ide/src/app/plugins/parser/services/code-parser-antlr-service.ts index f66416a588..576124eb55 100644 --- a/apps/remix-ide/src/app/plugins/parser/services/code-parser-antlr-service.ts +++ b/apps/remix-ide/src/app/plugins/parser/services/code-parser-antlr-service.ts @@ -71,7 +71,7 @@ export default class CodeParserAntlrService { setFileParsingState(file: string) { if (this.cache[file]) { - if (this.cache[file].blockDurations && this.cache[file].blockDurations.length > (this.parserTrehsholdSampleAmount-1)) { + if (this.cache[file].blockDurations && this.cache[file].blockDurations.length > this.parserTrehsholdSampleAmount) { // calculate average of durations to determine if the parsing should be disabled const values = [...this.cache[file].blockDurations] const average = values.reduce((a, b) => a + b, 0) / values.length