From 33c4c7f91ecdc522b72c82266db33f7e3b046807 Mon Sep 17 00:00:00 2001 From: S M Mahmudul Hasan Date: Wed, 13 Nov 2024 01:28:32 +0600 Subject: [PATCH] fix: use string concatenation for error message to improve cross-environment compatibility Co-authored-by: Jordan Harband --- lib/parse.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/parse.js b/lib/parse.js index 71362db0..d6a3823d 100644 --- a/lib/parse.js +++ b/lib/parse.js @@ -67,7 +67,7 @@ var parseValues = function parseQueryStringValues(str, options) { // Check if parts exceed the parameter limit and handle it if (options.throwOnLimitExceeded && parts.length > limit) { - throw new Error(`Parameter limit exceeded. Only ${limit} parameters allowed.`); + throw new Error('Parameter limit exceeded. Only ' + limit + ' parameters allowed.'); } var skipIndex = -1; // Keep track of where the utf8 sentinel was found