Skip to content

Commit 7b36800

Browse files
committed
v6.9.1
1 parent 6151be3 commit 7b36800

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## **6.9.1**
2+
- [Fix] `parse`: with comma true, handle field that holds an array of arrays (#335)
3+
- [Fix] `parse`: with comma true, do not split non-string values (#334)
4+
- [meta] add `funding` field
5+
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`
6+
- [Tests] use shared travis-ci config
7+
18
## **6.9.0**
29
- [New] `parse`/`stringify`: Pass extra key/value argument to `decoder` (#333)
310
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `evalmd`

dist/qs.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ module.exports = {
4545
var utils = require('./utils');
4646

4747
var has = Object.prototype.hasOwnProperty;
48+
var isArray = Array.isArray;
4849

4950
var defaults = {
5051
allowDots: false,
@@ -125,10 +126,14 @@ var parseValues = function parseQueryStringValues(str, options) {
125126
val = interpretNumericEntities(val);
126127
}
127128

128-
if (val && options.comma && val.indexOf(',') > -1) {
129+
if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
129130
val = val.split(',');
130131
}
131132

133+
if (part.indexOf('[]=') > -1) {
134+
val = isArray(val) ? [val] : val;
135+
}
136+
132137
if (has.call(obj, key)) {
133138
obj[key] = utils.combine(obj[key], val);
134139
} else {
@@ -611,6 +616,7 @@ var arrayToObject = function arrayToObject(source, options) {
611616
};
612617

613618
var merge = function merge(target, source, options) {
619+
/* eslint no-param-reassign: 0 */
614620
if (!source) {
615621
return target;
616622
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "qs",
33
"description": "A querystring parser that supports nesting and arrays, with a depth limit",
44
"homepage": "https://github.com/ljharb/qs",
5-
"version": "6.9.0",
5+
"version": "6.9.1",
66
"repository": {
77
"type": "git",
88
"url": "https://github.com/ljharb/qs.git"

0 commit comments

Comments
 (0)