Skip to content

Commit

Permalink
fix: use string concatenation for error message to improve cross-envi…
Browse files Browse the repository at this point in the history
…ronment compatibility

Co-authored-by: Jordan Harband <[email protected]>
  • Loading branch information
IamLizu and ljharb authored Nov 12, 2024
1 parent fc13250 commit 33c4c7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 33c4c7f

Please sign in to comment.