From 02608ac4a408207094e22cd1114ba3add703f0ec Mon Sep 17 00:00:00 2001 From: Konstantin Bryzgalin Date: Tue, 11 Jun 2024 11:58:49 +0500 Subject: [PATCH] fix #2752 setMaxParserCache throws TypeError --- lib/parsers/parser_cache.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/parsers/parser_cache.js b/lib/parsers/parser_cache.js index 0eb577703c..4f6b854050 100644 --- a/lib/parsers/parser_cache.js +++ b/lib/parsers/parser_cache.js @@ -51,7 +51,7 @@ function getParser(type, fields, options, config, compiler) { } function setMaxCache(max) { - parserCache.max = max; + parserCache = new LRU({ max }); } function clearCache() {