diff --git a/lib/contentTypeParser.js b/lib/contentTypeParser.js index 8f46dd0b61..3326e192c3 100644 --- a/lib/contentTypeParser.js +++ b/lib/contentTypeParser.js @@ -94,9 +94,8 @@ ContentTypeParser.prototype.getParser = function (contentType) { return this.customParsers.get(contentType) } - if (this.cache.has(contentType)) { - return this.cache.get(contentType) - } + const parser = this.cache.get(contentType) + if (parser !== undefined) return parser // eslint-disable-next-line no-var for (var i = 0; i !== this.parserList.length; ++i) { diff --git a/package.json b/package.json index 6dd992d589..ed5c910b3f 100644 --- a/package.json +++ b/package.json @@ -184,7 +184,7 @@ "rfdc": "^1.3.0", "secure-json-parse": "^2.5.0", "semver": "^7.3.7", - "tiny-lru": "^9.0.2" + "tiny-lru": "^10.0.0" }, "standard": { "ignore": [