Skip to content

Commit

Permalink
fix: setMaxParserCache throws TypeError (#2757)
Browse files Browse the repository at this point in the history
* fix #2752 setMaxParserCache throws TypeError
  • Loading branch information
constb authored Jun 13, 2024
1 parent b924c5a commit aa8604a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/parsers/parser_cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const LRU = require('lru-cache').default;

const parserCache = new LRU({
let parserCache = new LRU({
max: 15000,
});

Expand Down Expand Up @@ -51,7 +51,7 @@ function getParser(type, fields, options, config, compiler) {
}

function setMaxCache(max) {
parserCache.max = max;
parserCache = new LRU({ max });
}

function clearCache() {
Expand Down

0 comments on commit aa8604a

Please # to comment.